Ubuntu Pastebin

Paste from martin at Wed, 1 Jun 2016 10:07:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
diff --git a/runner/adt-run b/runner/adt-run
index a29eea1..c9ca411 100755
--- a/runner/adt-run
+++ b/runner/adt-run
@@ -357,7 +357,8 @@ def build_source(kind, arg, built_binaries):
         # shipped in all available versions, otherwise new binaries in pockets
         # would always win.
         # apt-get source is terribly noisy; only show what gets downloaded
-        create_command = ('''pkgs=$(apt-cache showsrc %(src)s | awk "/^Package-List:/ { inlist=1; next } (/^ / && inlist == 1) { thissrc[\$1] = 1; next } { if (!inlist) next; inlist=0; if (intersect) {for (p in pkgs) { if (!(p in thissrc)) delete pkgs[p] }} else { for (p in thissrc) { pkgs[p] = 1}; intersect=1 }; delete thissrc } END {for (p in pkgs) print p}");'''
+        create_command = ('pkgs=$(apt-cache showsrc --only-source %(src)s || [ $? != 100 ] || apt-cache showsrc %(src)s); '
+                          'pkgs=$(echo "$pkgs" | awk "/^Package-List:/ { inlist=1; next } (/^ / && inlist == 1) { thissrc[\$1] = 1; next } { if (!inlist) next; inlist=0; if (intersect) {for (p in pkgs) { if (!(p in thissrc)) delete pkgs[p] }} else { for (p in thissrc) { pkgs[p] = 1}; intersect=1 }; delete thissrc } END {for (p in pkgs) print p}");'
                           ' [ -n "$pkgs" ] || exit 1; '
                           ' for pkg in $pkgs; do'
                           '  pkg_candidate=$(apt-cache policy "^$pkg\$"|sed -n "/Candidate:/ { s/^.* //; /none/d; p}") || continue;'
Download as text