Merge ~xnox/germinate:skip-unbuilt-packages into germinate:master

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: ~xnox/germinate:skip-unbuilt-packages
Merge into: germinate:master
Diff against target: 19 lines (+8/-0)
1 file modified
germinate/scripts/germinate_update_metapackage.py (+8/-0)
Reviewer Review Type Date Requested Status
Colin Watson Needs Fixing
Steve Langasek Pending
Jeremy Bicha Pending
Review via email: mp+358807@code.launchpad.net

Commit message

Skip updating metapackages for arches which are not built.

results in the following metapackages skipped, if not needed:

...
minimal/s390x: Skipping package ubuntu-minimal (metapackage)
standard/s390x: Skipping package ubuntu-standard (metapackage)
[s390x] Skipping ubuntu-desktop-minimal missing from dh_listpackages
[s390x] Skipping ubuntu-desktop missing from dh_listpackages
server/s390x: Skipping package ubuntu-server (metapackage)
...

To post a comment you must log in.
Revision history for this message
Jeremy Bicha (jbicha) wrote :
Revision history for this message
Colin Watson (cjwatson) :
review: Needs Fixing

Unmerged commits

57f2868... by Dimitri John Ledkov

Skip updating metapackages for arches which are not built.

Signed-off-by: Dimitri John Ledkov <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/germinate/scripts/germinate_update_metapackage.py b/germinate/scripts/germinate_update_metapackage.py
2index d1b419f..a06ce89 100644
3--- a/germinate/scripts/germinate_update_metapackage.py
4+++ b/germinate/scripts/germinate_update_metapackage.py
5@@ -289,6 +289,14 @@ def main(argv):
6 for seed_name in output_seeds:
7 meta_name = metapackage_name(structure, seed_name)
8 metapackage_map[seed_name] = meta_name
9+ active_packages = subprocess.check_output(
10+ ['dpkg-architecture','-a%s' % architecture,
11+ '-c', 'dh_listpackages'],
12+ stderr=subprocess.DEVNULL, universal_newlines=True)
13+ if meta_name not in active_packages:
14+ print("[%s] Skipping %s missing from dh_listpackages" %
15+ (architecture, meta_name))
16+ continue
17
18 output_filename = os.path.join(
19 options.outdir, '%s-%s' % (seed_name, architecture))

Subscribers

People subscribed via source and target branches