Merge ~tsimonq2/germinate:master into germinate:master

Proposed by Simon Quigley
Status: Needs review
Proposed branch: ~tsimonq2/germinate:master
Merge into: germinate:master
Diff against target: 32 lines (+14/-0)
1 file modified
germinate/germinator.py (+14/-0)
Reviewer Review Type Date Requested Status
Julian Andres Klode Disapprove
Steve Langasek Pending
Michael Hudson-Doyle Pending
Germinate hackers Pending
Review via email: mp+462006@code.launchpad.net

Commit message

Do not include NBS packages (LP: #2056483)

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

On the one hand this makes sense for the bug at hand, but this fails to take into consideration the wider effect of how libraries migrate. We have britney set to SMOOTH_UPDATES = libs oldlibs such that e.g. a new libefivar2 can migrate while packages still Depend on libefivar1, as long as they are co-installable.

The proposed change here would break image building in that case which does not seem the right cause of action.

review: Disapprove

Unmerged commits

faccdf1... by Simon Quigley

Do not include NBS packages (LP: #2056483)

Succeeded
[SUCCEEDED] test:0 (build)
11 of 1 result

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/germinate/germinator.py b/germinate/germinator.py
2index 0a57068..34b2d51 100644
3--- a/germinate/germinator.py
4+++ b/germinate/germinator.py
5@@ -576,6 +576,18 @@ class Germinator:
6 dep_list.append(" | ".join(or_list))
7 return ", ".join(dep_list)
8
9+ def _strip_nbs(self):
10+ bins = set()
11+ for src in self._sources.values():
12+ bins.update(src["Binaries"])
13+
14+ all_bins = set(self._packages.keys())
15+ nbs = all_bins - bins
16+
17+ # Remove binaries not built from any source
18+ for binary in nbs:
19+ del self._packages[binary]
20+
21 def _parse_src_depends(self, value):
22 """Parse Build-Depends from value, without stripping qualifiers."""
23 try:
24@@ -635,6 +647,8 @@ class Germinator:
25 else:
26 raise ValueError("Unknown index type %d" % indextype)
27
28+ self._strip_nbs()
29+
30 # Construct a more convenient representation of Provides fields.
31 for pkg in sorted(self._packages):
32 for prov in self._packages[pkg]["Provides"]:

Subscribers

People subscribed via source and target branches

to all changes: