Merge ~craig.magina/enablement-ppa:master into enablement-ppa:master

Proposed by Craig Magina
Status: Merged
Merge reported by: dann frazier
Merged at revision: not available
Proposed branch: ~craig.magina/enablement-ppa:master
Merge into: enablement-ppa:master
Diff against target: 65 lines (+35/-9)
2 files modified
debian/changelog (+7/-0)
debian/enablement-ppa.postinst (+28/-9)
Reviewer Review Type Date Requested Status
dann frazier Approve
Review via email: mp+291955@code.launchpad.net

Description of the change

Added support for a local url, i.e. http://server/path/to/mirror

To post a comment you must log in.
Revision history for this message
dann frazier (dannf) wrote :

Thanks - looks good, and tested fine. I made a couple of minor changes, just for future reference:

I merged the debian/changelog change into the same changeset as the actual fix. If you do it like that, you can use debcommit to prepare the commit for you. I also left the release unfinished in that commit (UNRELEASED instead of xenial).

review: Approve
Revision history for this message
dann frazier (dannf) wrote :

Also, I uploaded to ppa:yarmouth-team/thunderx, if you just want to pocket copy to your enablement ppa.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 37b3e8f..c1c282e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+enablement-ppa (0.5) xenial; urgency=medium
7+
8+ * Added support for local urls
9+ - LP: 1557022
10+
11+ -- Craig Magina <craig.magina@canonical.com> Tue, 29 Mar 2016 17:06:24 -0400
12+
13 enablement-ppa (0.4) xenial; urgency=medium
14
15 * Don't skip apt-setup preseeding when using a public PPA.
16diff --git a/debian/enablement-ppa.postinst b/debian/enablement-ppa.postinst
17index 542e0df..fd83b4b 100644
18--- a/debian/enablement-ppa.postinst
19+++ b/debian/enablement-ppa.postinst
20@@ -13,17 +13,36 @@ while :; do
21 ppa="$RET"
22 db_get mirror/codename
23 codename="$RET"
24- ppa_owner="$(echo $ppa | cut -d: -f2 | cut -d/ -f1)"
25- ppa_name="$(echo $ppa | cut -d/ -f2)"
26
27- ppa_url="http://ppa.launchpad.net/${ppa_owner}/${ppa_name}/ubuntu"
28- if wget "$ppa_url/dists/${codename}/Release" -O - > /dev/null; then
29- ppa_access="public"
30- STATE=$(($STATE + 1))
31- continue
32- fi
33+ case "$ppa" in
34+ ppa*)
35+ ppa_owner="$(echo $ppa | cut -d: -f2 | cut -d/ -f1)"
36+ ppa_name="$(echo $ppa | cut -d/ -f2)"
37+
38+ ppa_url="http://ppa.launchpad.net/${ppa_owner}/${ppa_name}/ubuntu"
39+ if wget "$ppa_url/dists/${codename}/Release" -O - > /dev/null; then
40+ ppa_access="public"
41+ STATE=$(($STATE + 1))
42+ continue
43+ fi
44
45- ppa_url="https://private-ppa.launchpad.net/${ppa_owner}/${ppa_name}/ubuntu"
46+ ppa_url="https://private-ppa.launchpad.net/${ppa_owner}/${ppa_name}/ubuntu"
47+ ;;
48+ http*)
49+ ppa_url="$ppa"
50+ if wget "$ppa_url/dists/${codename}/Release" -O - > /dev/null; then
51+ ppa_access="public"
52+ STATE=$(($STATE + 1))
53+ continue
54+ fi
55+ ;;
56+ *)
57+ db_subst enablement-ppa/invalid-ppa PPA "$ppa"
58+ db_fset enablement-ppa/invalid-ppa seen false
59+ db_input critical enablement-ppa/invalid-ppa
60+ STATE=0
61+ ;;
62+ esac
63 wget --no-check-certificate \
64 "$ppa_url/dists/${codename}/Release" -O - > /dev/null
65 case $? in

Subscribers

People subscribed via source and target branches

to all changes: