Merge lp:~cjwatson/britney/dynamic-arches into lp:~ubuntu-release/britney/britney1-ubuntu

Proposed by Colin Watson
Status: Merged
Merged at revision: 279
Proposed branch: lp:~cjwatson/britney/dynamic-arches
Merge into: lp:~ubuntu-release/britney/britney1-ubuntu
Diff against target: 64 lines (+25/-6)
1 file modified
britney (+25/-6)
To merge this branch: bzr merge lp:~cjwatson/britney/dynamic-arches
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+250462@code.launchpad.net

Commit message

Generate the britney2 configuration file dynamically, with series-appropriate architecture lists.

Description of the change

Generate the britney2 configuration file dynamically, with series-appropriate architecture lists.

This is needed to run for precise, which had a different set of architectures.

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'britney'
2--- britney 2015-02-19 12:56:42 +0000
3+++ britney 2015-02-20 15:36:49 +0000
4@@ -90,7 +90,7 @@
5
6 #eval $( dak admin config db-shell )
7
8-suite_arches () {
9+suite_info () {
10 python -c '
11 from __future__ import print_function
12
13@@ -115,8 +115,15 @@
14 distro = launchpad.distributions[sys.argv[2]]
15 series_name = sys.argv[3].split("-")[0]
16 series = distro.getSeries(name_or_version=series_name)
17-print(" ".join(arch.architecture_tag for arch in series.architectures))
18-' "$LP_SERVICE" "$DISTRIBUTION" "$1"
19+'"$1" "$LP_SERVICE" "$DISTRIBUTION" "$2"
20+}
21+
22+suite_arches () {
23+ suite_info 'print(" ".join(arch.architecture_tag for arch in series.architectures))' "$1"
24+}
25+
26+suite_archindep () {
27+ suite_info 'print(series.nominatedarchindep.architecture_tag)' "$1"
28 }
29
30 if ! qoption allowdaklock; then
31@@ -352,9 +359,19 @@
32 -a "Reply-To: britney2@release.debian.org" britney2@release.debian.org
33 }
34
35+make_b2_config () {
36+ local arches archindep
37+ arches=`suite_arches $SERIES`
38+ archindep=`suite_archindep $SERIES`
39+ sed -e "s/^\\(ARCHITECTURES *= \\).*/\\1$arches/" \
40+ -e "s/^\\(NOBREAKALL_ARCHES *= \\).*/\\1$archindep/" \
41+ "$1" >"$2"
42+}
43+
44 run_b2 () {
45 cd $BASE
46- $CODE_B2/britney.py -c $B2_CONFIG -v --distribution=$DISTRIBUTION --series=$SERIES
47+ make_b2_config "$B2_CONFIG" "$B2_CONFIG.$DISTRIBUTION.$SERIES"
48+ $CODE_B2/britney.py -c "$B2_CONFIG.$DISTRIBUTION.$SERIES" -v --distribution=$DISTRIBUTION --series=$SERIES
49 }
50
51 if option run; then
52@@ -439,8 +456,10 @@
53
54 # TODO: {stable,unstable}_uninst.txt -- needs support in b2, talk to Fabio
55 # TODO: this creates uninstallability reports against b2 results, not b1's
56- create_uninst_report $B2_CONFIG ${SERIES}_uninst.txt
57- create_uninst_report $B2_CONFIG_NOBREAKALL ${SERIES}_uninst_full.txt
58+ make_b2_config "$B2_CONFIG" "$B2_CONFIG.$DISTRIBUTION.$SERIES"
59+ make_b2_config "$B2_CONFIG_NOBREAKALL" "$B2_CONFIG_NOBREAKALL.$DISTRIBUTION.$SERIES"
60+ create_uninst_report "$B2_CONFIG.$DISTRIBUTION.$SERIES" ${SERIES}_uninst.txt
61+ create_uninst_report "$B2_CONFIG_NOBREAKALL.$DISTRIBUTION.$SERIES" ${SERIES}_uninst_full.txt
62
63 #if grep -q -e '-meta-faux' $HTML/testing_uninst.txt; then
64 # echo >&2 'Warning! Some -meta-faux package is uninstallable!'

Subscribers

People subscribed via source and target branches