Merge lp:~gandelman-a/charms/precise/openstack-dashboard/fixes into lp:~charmers/charms/precise/openstack-dashboard/trunk

Proposed by Adam Gandelman
Status: Merged
Merge reported by: Adam Gandelman
Merged at revision: not available
Proposed branch: lp:~gandelman-a/charms/precise/openstack-dashboard/fixes
Merge into: lp:~charmers/charms/precise/openstack-dashboard/trunk
Diff against target: 54 lines (+15/-2)
2 files modified
hooks/horizon-relations (+1/-1)
hooks/lib/openstack-common (+14/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/openstack-dashboard/fixes
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+136820@code.launchpad.net

Description of the change

Some fixes for handling of repo URLs via 'openstack-origin' config. Courtesy of James Page, but I seem to have lost write access to these branches to merge myself.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/horizon-relations'
2--- hooks/horizon-relations 2012-10-12 17:30:30 +0000
3+++ hooks/horizon-relations 2012-11-29 00:14:30 +0000
4@@ -11,7 +11,7 @@
5 fi
6
7 function install_hook {
8- configure_install_source $(config-get openstack-origin)
9+ configure_install_source "$(config-get openstack-origin)"
10 apt-get update
11 juju-log "$CHARM: Installing $PACKAGES."
12 DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
13
14=== modified file 'hooks/lib/openstack-common'
15--- hooks/lib/openstack-common 2012-10-12 20:44:22 +0000
16+++ hooks/lib/openstack-common 2012-11-29 00:14:30 +0000
17@@ -78,7 +78,7 @@
18 juju-log "$CHARM No repository key specified"
19 url="$src"
20 fi
21- add-apt-repository -y "$url"
22+ echo $url > /etc/apt/sources.list.d/juju_deb.list
23 fi
24 return 0
25 fi
26@@ -129,6 +129,7 @@
27 "oneiric") codename="diablo" ;;
28 "precise") codename="essex" ;;
29 "quantal") codename="folsom" ;;
30+ "raring") codename="grizzly" ;;
31 esac
32 fi
33
34@@ -141,9 +142,21 @@
35 case "$ca_rel" in
36 "folsom"|"folsom/updates"|"folsom/proposed"|"folsom/staging")
37 codename="folsom" ;;
38+ "grizzly"|"grizzly/updates"|"grizzly/proposed"|"grizzy/staging")
39+ codename="grizly" ;;
40 esac
41 fi
42 fi
43+
44+ # have a guess based on the deb string provided
45+ if [[ "${rel:0:3}" == "deb" ]]; then
46+ CODENAMES="diablo essex folsom grizzly"
47+ for cname in $CODENAMES; do
48+ if echo $rel | grep -q $cname; then
49+ codename=$cname
50+ fi
51+ done
52+ fi
53 echo $codename
54 }
55

Subscribers

People subscribed via source and target branches