Verified Commit 6427696b authored by Iain Lane's avatar Iain Lane

Restore "apt-cache source --only-source" -> "apt-cache showsrc" fallback

We still need this in trusty.

This conceptually reverts dc1c110d.
parent 11c2e2d3
......@@ -413,8 +413,12 @@ def build_source(kind, arg, built_binaries):
# very old source packages don't have Package-List: yet, fall back to
# Binary: (Binary: is generally not sufficient as it gets truncated for
# long lists, althought that problem should fade out as well).
#
# apt-cache showsrc --only-source is supported from Ubuntu 16.04
# (xenial) onwards; remove the below fallback when we no longer need to
# support 14.04 (trusty)
create_command_part1 = '''
pkgs=$(apt-cache showsrc --only-source %(src)s);
pkgs=$(apt-cache showsrc --only-source %(src)s || [ $? != 100 ] || apt-cache showsrc %(src)s);
pkgs=$(echo "$pkgs\n" | awk "
/^Package: / {
if (\\$2 != \\"%(src)s\\") { skippar=1; next; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment