Merge lp:~gandelman-a/charms/oneiric/glance/custom_ppa into lp:~charmers/charms/oneiric/glance/trunk

Proposed by Adam Gandelman
Status: Merged
Approved by: Juan L. Negron
Approved revision: 14
Merge reported by: Juan L. Negron
Merged at revision: not available
Proposed branch: lp:~gandelman-a/charms/oneiric/glance/custom_ppa
Merge into: lp:~charmers/charms/oneiric/glance/trunk
Diff against target: 53 lines (+17/-5)
3 files modified
config.yaml (+1/-1)
hooks/glance-common (+15/-3)
hooks/glance-relations (+1/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/oneiric/glance/custom_ppa
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+85982@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Approved ... Merged.

-Juan

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2011-09-16 17:34:31 +0000
3+++ config.yaml 2011-12-16 02:48:23 +0000
4@@ -2,7 +2,7 @@
5 glance-release:
6 default: distro
7 type: string
8- description: Glance PPA from which to install. (distro, trunk, milestone, milestone-proposed)
9+ description: Glance PPA from which to install. (distro, trunk, milestone, milestone-proposed or ppa:somewhere/else)
10 api-config:
11 default: /etc/glance/glance-api.conf
12 type: string
13
14=== modified file 'hooks/glance-common'
15--- hooks/glance-common 2011-12-02 23:33:07 +0000
16+++ hooks/glance-common 2011-12-16 02:48:23 +0000
17@@ -71,8 +71,20 @@
18 # Install from archive instead of PPA.
19 [[ $PPA == "distro" ]] && return 0
20 . /etc/lsb-release
21- juju-log "glance: Setting up PPA for $PPA"
22 [[ -z $PPA ]] && return 0
23- PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
24- add-apt-repository "$PPA_URL" || exit 1
25+ # if referenced by name, setup ppa to upstream PPAs
26+ if [[ "$PPA" == "trunk" ]] ||
27+ [[ "$PPA" == "milestone" ]] ||
28+ [[ "$PPA" == "milestone-proposed" ]] ; then
29+ juju-log "glance: Configuring installation from upstream PPA ($PPA)"
30+ PPA_URL="deb http://ppa.launchpad.net/glance-core/$PPA/ubuntu $DISTRIB_CODENAME main"
31+ add-apt-repository "$PPA_URL" || exit 1
32+ return
33+ fi
34+ if [[ "${PPA:0:4}" == "ppa:" ]] ; then
35+ juju-log "glance: Configuring installation from custom PPA ($PPA)"
36+ add-apt-repository -y "$PPA" || exit 1
37+ return
38+ fi
39+ juju-log "glance: No PPA specified. Falling back to installation from Ubuntu archive."
40 }
41
42=== modified file 'hooks/glance-relations'
43--- hooks/glance-relations 2011-12-02 23:33:07 +0000
44+++ hooks/glance-relations 2011-12-16 02:48:23 +0000
45@@ -10,7 +10,7 @@
46 fi
47
48 function install_hook {
49- juju-log "Installing nova packages"
50+ juju-log "Installing glance packages"
51 apt-get -y install python-software-properties || exit 1
52
53 add_ppa

Subscribers

People subscribed via source and target branches

to all changes: