Merge ~xnox/germinate/+git/builtusing2:master into germinate:master

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: ~xnox/germinate/+git/builtusing2:master
Merge into: germinate:master
Diff against target: 102 lines (+25/-6)
3 files modified
debian/changelog (+5/-1)
germinate/germinator.py (+19/-5)
germinate/tests/test_germinator.py (+1/-0)
Reviewer Review Type Date Requested Status
Colin Watson Needs Fixing
Adam Conrad Pending
Steve Langasek Pending
Ubuntu Package Archive Administrators Pending
Review via email: mp+308743@code.launchpad.net

Description of the change

built-using in components mismatches try #2.

http://people.canonical.com/~xnox/germinate-output/builtusing2/components-missmatches.html

No changes to .svg

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Shall I upload this to the archive? But it would need deployment on snake fruit too...

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Note the:
golang-go-xdg: golang-go-xdg-dev
[Reverse-Depends: Rescued from golang-go-xdg (Reverse Built-Using ubuntu-push-client,golang-ubuntu-push-dev)]

in the new html.

Currently it says for this package:
golang-go-xdg: golang-go-xdg-dev
[Reverse-Depends: Rescued from golang-go-xdg]

No other changes to any other logic, just the comment that is pushed out to the .html output has more useful information.

Revision history for this message
Colin Watson (cjwatson) wrote :

This looks broadly OK, but I've commented on a few things I'd like to see fixed before we land this.

review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Thank you for this review and comments.

Thinking about this now, I think the most user-friendly result here would be to do the following:

 - inspect built-using
 - if built-using binaries, are in build-deps
 - turn follow-build-depends back on for that build-dep

Plus, all the things you mentioned in your review comments including go and non-go test cases.

Revision history for this message
Adam Conrad (adconrad) wrote :

> - if built-using binaries, are in build-deps

Built-Using contains sources, not binaries. We don't require build-deps to be in main, and I don't see why binaries of Built-Using should be any more special. We should be concerned with promoting sources here, not binaries.

ie: If I build foo-main against libbaruniverse-static, Canonical is committing to support the baruniverse SOURCE that produced libbaruniverse (to make sure we get it updates with security fixes, etc), and we have to ship it alongside foo for GPL compliance reasons, but that doesn't mean we're saying we support users installing the binary package libuniverse-static.

Trying to guess at binaries seems like a pointless exercise, really, and it's entirely possible to promote a source but none of its binaries.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

ok. This makes more sense.

On Fri, 18 Oct 2019 at 17:09, Adam Conrad <adconrad@0c3.net> wrote:
>
> > - if built-using binaries, are in build-deps
>
> Built-Using contains sources, not binaries. We don't require build-deps to be in main, and I don't see why binaries of Built-Using should be any more special. We should be concerned with promoting sources here, not binaries.
>
> ie: If I build foo-main against libbaruniverse-static, Canonical is committing to support the baruniverse SOURCE that produced libbaruniverse (to make sure we get it updates with security fixes, etc), and we have to ship it alongside foo for GPL compliance reasons, but that doesn't mean we're saying we support users installing the binary package libuniverse-static.
>
> Trying to guess at binaries seems like a pointless exercise, really, and it's entirely possible to promote a source but none of its binaries.
> --
> https://code.launchpad.net/~xnox/germinate/+git/builtusing2/+merge/308743
> You are the owner of ~xnox/germinate/+git/builtusing2:master.

--
Regards,

Dimitri.

Unmerged commits

3a6300c... by Dimitri John Ledkov

Add built-using explanation to the Rescue excuse.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ab3387c..8f0b978 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,10 +1,14 @@
6 germinate (2.26) UNRELEASED; urgency=medium
7
8+ [ Colin Watson ]
9 * Add an --always-follow-build-depends option to force germinate to follow
10 Build-Depends regardless of seed feature flags.
11 * Change default distribution to yakkety.
12
13- -- Colin Watson <cjwatson@debian.org> Wed, 20 Apr 2016 22:41:49 +0100
14+ [ Dimitri John Ledkov ]
15+ * Add built-using explanation to the Rescue excuse.
16+
17+ -- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 17 Oct 2016 13:37:14 +0200
18
19 germinate (2.25) unstable; urgency=medium
20
21diff --git a/germinate/germinator.py b/germinate/germinator.py
22index a86c25d..8d50608 100644
23--- a/germinate/germinator.py
24+++ b/germinate/germinator.py
25@@ -86,7 +86,6 @@ class RecommendsReason(object):
26 def __str__(self):
27 return '%s (Recommends)' % self._pkg
28
29-
30 class DependsReason(object):
31 def __init__(self, pkg):
32 self._pkg = pkg
33@@ -110,6 +109,14 @@ class RescueReason(object):
34 def __str__(self):
35 return 'Rescued from %s' % self._src
36
37+class RescueBuiltUsingReason(object):
38+ def __init__(self, src, reverse_bu):
39+ self._src = src
40+ self._reverse_bu = reverse_bu
41+
42+ def __str__(self):
43+ return 'Rescued from %s (Reverse Built-Using %s)' % (
44+ self._src, self._reverse_bu)
45
46 class SeedKernelVersions(object):
47 """A virtual seed entry representing lexically scoped Kernel-Version."""
48@@ -579,6 +586,7 @@ class Germinator(object):
49
50 self._sources[src] = {}
51
52+ self._sources[src]["Reverse-Built-Using"] = set()
53 self._sources[src]["Maintainer"] = \
54 _ensure_unicode(section.get("Maintainer", ""))
55 self._sources[src]["Version"] = ver
56@@ -1480,8 +1488,7 @@ class Germinator(object):
57 _logger.error("Nothing to choose to satisfy %s",
58 pkg)
59
60- def _remember_why(self, reasons, pkg, why, build_tree=False,
61- recommends=False):
62+ def _remember_why(self, reasons, pkg, why, build_tree=False, recommends=False):
63 """Remember why this package was added to the output for this seed."""
64 if pkg in reasons:
65 old_why, old_build_tree, old_recommends = reasons[pkg]
66@@ -1596,6 +1603,8 @@ class Germinator(object):
67 for pkg_src in pkg_srcs:
68 if build_tree or pkg_src in built_using:
69 seed._build_sourcepkgs.add(pkg_src)
70+ if pkg_src in built_using:
71+ self._sources[pkg_src]["Reverse-Built-Using"].add(pkg)
72 if pkg_src in output._blacklist:
73 seed._blacklisted.add(pkg_src)
74 else:
75@@ -1667,8 +1676,13 @@ class Germinator(object):
76 seed._build_depends.add(pkg)
77 else:
78 seed._depends.add(pkg)
79- self._add_package(seed, pkg, RescueReason(src),
80- build_tree=build_tree)
81+ # add pkg, which came from src
82+ # it is rescued
83+ reason = RescueReason(src)
84+ if len(self._sources[src]["Reverse-Built-Using"]):
85+ reverse_bu = ', '.join(self._sources[src]["Reverse-Built-Using"])
86+ reason = RescueBuiltUsingReason(src, reverse_bu)
87+ self._add_package(seed, pkg, reason, build_tree=build_tree)
88
89 # Accessors.
90 # ----------
91diff --git a/germinate/tests/test_germinator.py b/germinate/tests/test_germinator.py
92index 79956dc..306c9e8 100644
93--- a/germinate/tests/test_germinator.py
94+++ b/germinate/tests/test_germinator.py
95@@ -161,6 +161,7 @@ class TestGerminator(TestCase):
96 "Build-Depends-Indep": [],
97 "Build-Depends-Arch": [],
98 "Binaries": ["hello", "hello-dependency"],
99+ "Reverse-Built-Using": set(),
100 }, germinator._sources["hello"])
101 self.assertIn("hello", germinator._packages)
102 self.assertEqual({

Subscribers

People subscribed via source and target branches