Ensure source packages get uploaded to Apt
- In the even that a source package name doesn't match the name of any
of its binary packages (ex: linux-imx generates
linux-{image,headers,kbuild}-4.9.51-imx), the source packages weren't
being included in the update tarball.
Change-Id: I361fb338f705d040aa7cf32fc8c933e0cf1548b2
diff --git a/generate_update_tarball.py b/generate_update_tarball.py
index 4a38b8b..62dc023 100755
--- a/generate_update_tarball.py
+++ b/generate_update_tarball.py
@@ -46,6 +46,8 @@
packages = deb822.Packages.iter_paragraphs(control_file)
for p in packages:
+ if 'Source' in p:
+ package_name = p['Source']
if 'Package' in p and 'Architecture' in p:
arches = p['Architecture']
if arches in VERSION_MAP:
@@ -136,6 +138,9 @@
for deb in debs_to_update:
for filename in glob.glob('%s/**/*%s*' % (args.package_dir, deb.split(':')[0])):
output_files.add(filename)
+ for package in packages_to_update:
+ for filename in glob.glob('%s/**/*%s*' % (args.package_dir, package)):
+ output_files.add(filename)
# Generate a tarball appropriate for uploading containing the new packages.
with tempfile.TemporaryDirectory() as tempdir: