Merge bileto:fix-hints into bileto:master

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: cb5d23bd32d18f070c51930677e3cd6d04109f23
Proposed branch: bileto:fix-hints
Merge into: bileto:master
Diff against target: 107 lines (+36/-16)
3 files modified
britney/britney.conf.in (+17/-9)
britney/fetch-indexes (+5/-1)
scripts/update.sh (+14/-6)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+394633@code.launchpad.net

Commit message

Switch hints from bzr to git, actually handle per-series hints, update hints permissions.

Description of the change

Switch hints from bzr to git, actually handle per-series hints, update hints permissions.

Hints handling in Bileto never really worked. We recently switched from bzr to git, but even before that, the hints never really worked due to two reasons:
1) Outdated hints permissions (REALLY outdated, didn't even have ubuntu-release added)
2) No handling of per-series hints, always used the devel hints

After landing this branch we should have proper per-series hints and everything working as expected. Hopefully.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Approved with comments.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/britney/britney.conf.in b/britney/britney.conf.in
2index 02bec2a..a9c2faf 100644
3--- a/britney/britney.conf.in
4+++ b/britney/britney.conf.in
5@@ -45,15 +45,23 @@ MINDAYS_EMERGENCY = 0
6 DEFAULT_URGENCY = medium
7
8 # hint permissions
9-HINTS_CJWATSON = ALL
10-HINTS_ADCONRAD = ALL
11-HINTS_KITTERMAN = ALL
12-HINTS_LANEY = ALL
13-HINTS_JRIDDELL = ALL
14-HINTS_STEFANOR = ALL
15-HINTS_STGRABER = ALL
16-HINTS_VORLON = ALL
17-HINTS_PITTI = ALL
18+HINTS_ADCONRAD = ALL
19+HINTS_LANEY = ALL
20+HINTS_STEFANOR = ALL
21+HINTS_STGRABER = ALL
22+HINTS_VORLON = ALL
23+HINTS_PITTI = ALL
24+HINTS_UBUNTU-RELEASE = ALL
25+# SRU team
26+HINTS_APW = ALL
27+HINTS_ARGES = ALL
28+HINTS_BRIAN-MURRAY = ALL
29+HINTS_RACB = ALL
30+HINTS_RAOF = ALL
31+HINTS_SIL2100 = ALL
32+HINTS_TJAALTON = ALL
33+HINTS_UBUNTU-SRU = ALL
34+HINTS_FREEZE = block block-all
35
36 # support for old libraries in testing (smooth update)
37 # use ALL to enable smooth updates for all the sections
38diff --git a/britney/fetch-indexes b/britney/fetch-indexes
39index 1fa5933..2721513 100755
40--- a/britney/fetch-indexes
41+++ b/britney/fetch-indexes
42@@ -25,6 +25,7 @@ CODEDIR=$(dirname "$(readlink -f "$0")")
43 ROOTDIR=$(dirname "$CODEDIR")
44 DATADIR=/tmp/britney_data
45 OUTDIR=/tmp/britney_output
46+# Make sure this one never has a trailing '/', as we add a suffix to it.
47 HINTDIR=/tmp/britney_hints
48 CACHE=$DATADIR/CACHE
49 ARCHIVE=http://archive.ubuntu.com/ubuntu/dists
50@@ -62,6 +63,9 @@ refresh() {
51 SERIES="$(echo $RAW_SERIES | sed 's/-overlay//')"
52 export SERIES
53
54+devel_series=$(distro-info --devel)
55+HINTSERIES="$(echo $SERIES | sed s/$devel_series/devel/)"
56+
57 case "$#" in
58 2)
59 export PPA="$1"
60@@ -158,7 +162,7 @@ else
61 DEST=$DATADIR/$PPA-$SERIES
62 mkdir --parents $DEST "$OUTDIR/$BRITNEY_TIMESTAMP/"
63 touch --no-create $DEST
64- loudly ln --verbose --symbolic --force --no-dereference $HINTDIR $DEST/Hints
65+ loudly ln --verbose --symbolic --force --no-dereference $HINTDIR-$HINTSERIES $DEST/Hints
66 zcat $CACHE/$PPA-$SERIES/*/source/Sources.gz > $DEST/Sources
67 for arch in $ARCHES $PORTS_ARCHES; do
68 zcat $CACHE/$PPA-$SERIES/*/binary-$arch/Packages.gz > $DEST/Packages_${arch}
69diff --git a/scripts/update.sh b/scripts/update.sh
70index 1a7c7f5..6024313 100755
71--- a/scripts/update.sh
72+++ b/scripts/update.sh
73@@ -8,20 +8,28 @@ HINTS="/tmp/britney_hints"
74
75 update() {
76 [ -d "$1" ] || git init "$1"
77- git -C "$1" fetch --update-head-ok --force "$2" refs/heads/master:refs/heads/master
78- git -C "$1" reset --hard master
79+ git -C "$1" fetch --update-head-ok --force "$2" refs/heads/$3:refs/heads/$3
80+ git -C "$1" checkout $3
81+ git -C "$1" reset --hard $3
82 }
83
84 set -eux
85
86-[ -d "$HINTS" ] || bzr branch lp:~ubuntu-release/britney/hints-ubuntu "$HINTS"
87-bzr pull --overwrite --directory "$HINTS"
88+# The hints branches migrated from bzr to git.
89+[ -d "$HINTS/.bzr" ] && rm -rf $HINTS
90+
91+# Checkout latest hints for all supported series.
92+devel=$(distro-info --devel)
93+for series in $(distro-info --supported); do
94+ [ "$series" = "$devel" ] && series="devel"
95+ update "$HINTS-$series" https://git.launchpad.net/~ubuntu-release/britney/+git/hints-ubuntu "$series"
96+done
97
98 old_commit="$(git -C "$BILETO" log --max-count 1 --oneline)" || true
99-update "$BILETO" "$(cat "$BILETO.branch")"
100+update "$BILETO" "$(cat "$BILETO.branch")" "master"
101 new_commit="$(git -C "$BILETO" log --max-count 1 --oneline)"
102
103-update "$BRITNEY" https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
104+update "$BRITNEY" https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu "master"
105
106
107 [ "$old_commit" = "$new_commit" ] || $BILETO/scripts/install.sh

Subscribers

People subscribed via source and target branches

to all changes: