Merge lp:~sergiusens/snapcraft/printless into lp:~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov
Status: Merged
Approved by: John Lenton
Approved revision: 204
Merged at revision: 204
Proposed branch: lp:~sergiusens/snapcraft/printless
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 35 lines (+11/-2)
1 file modified
snapcraft/repo.py (+11/-2)
To merge this branch: bzr merge lp:~sergiusens/snapcraft/printless
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+272101@code.launchpad.net

Commit message

Show skipped packages only once per filter

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) :
review: Approve
lp:~sergiusens/snapcraft/printless updated
204. By Sergio Schvezov

why join if we can expand?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snapcraft/repo.py'
2--- snapcraft/repo.py 2015-09-22 13:22:57 +0000
3+++ snapcraft/repo.py 2015-09-23 14:10:32 +0000
4@@ -80,6 +80,9 @@
5 except KeyError:
6 raise PackageNotFoundError(name)
7
8+ skipped_essential = []
9+ skipped_blacklisted = []
10+
11 # unmark some base packages here
12 # note that this will break the consistency check inside apt_cache
13 # (self.apt_cache.broken_count will be > 0)
14@@ -90,13 +93,19 @@
15 # diving into downloading libc6
16 if (pkg.candidate.priority in 'essential' and
17 pkg.name not in package_names):
18- print('Skipping priority essential/important %s' % pkg.name)
19+ skipped_essential.append(pkg.name)
20 pkg.mark_keep()
21 continue
22 if (pkg.name in manifest_dep_names and pkg.name not in package_names):
23- print('Skipping blacklisted from manifest package %s' % pkg.name)
24+ skipped_blacklisted.append(pkg.name)
25 pkg.mark_keep()
26 continue
27+
28+ if skipped_essential:
29+ print('Skipping priority essential packages:', skipped_essential)
30+ if skipped_blacklisted:
31+ print('Skipping blacklisted from manifest packages:', skipped_blacklisted)
32+
33 # download the remaining ones with proper progress
34 apt.apt_pkg.config.set("Dir::Cache::Archives", self.downloaddir)
35 self.apt_cache.fetch_archives()

Subscribers

People subscribed via source and target branches