~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/utils/packaging/config/global_constants.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 Canonical Ltd.
 
2
// Copyright 2015 Cloudbase Solutions SRL
 
3
// Licensed under the LGPLv3, see LICENCE file for details.
 
4
 
 
5
package config
 
6
 
 
7
const (
 
8
        // PackageManagerLoopFunction is a bash function that executes its arguments
 
9
        // in a loop with a delay until either the command either returns
 
10
        // with an exit code other than 100.
 
11
        PackageManagerLoopFunction = `
 
12
function package_manager_loop {
 
13
    local rc=
 
14
    while true; do
 
15
        if ($*); then
 
16
                return 0
 
17
        else
 
18
                rc=$?
 
19
        fi
 
20
        if [ $rc -eq 100 ]; then
 
21
                sleep 10s
 
22
                continue
 
23
        fi
 
24
        return $rc
 
25
    done
 
26
}
 
27
`
 
28
)
 
29
 
 
30
var (
 
31
        seriesRequiringCloudTools = map[string]bool{
 
32
                // TODO (aznashwan, all): add any other OS's
 
33
                // which require cloud tools' series here.
 
34
                "precise": true,
 
35
        }
 
36
 
 
37
        // DefaultPackages is a list of the default packages Juju'd like to see
 
38
        // installed on all it's machines.
 
39
        DefaultPackages = []string{
 
40
                // TODO (everyone): populate this list with all required packages.
 
41
                // for example:
 
42
                "curl",
 
43
        }
 
44
 
 
45
        backportsBySeries = map[string][]string{
 
46
                "trusty": []string{"lxd"},
 
47
        }
 
48
)