On 2015-05-25 20:00, David Prévot wrote: > Package: release.debian.org > Severity: normal > User: release.debian....@packages.debian.org > Usertags: britney > > Hi, > > Now that both dpkg and apt are able to use versioned Provides, it would > be nice to take it into consideration for testing migrations. >
Hi David, Thanks for your interest and your initial patches. In particular, thanks for taking the time to construct a test case. > Please find attached a basic new test for britney2-tests and a simple > documentation update for britney’s dependencies. > > I tried to figure out what would be needed to make that work, but > unfortunately don’t understand much Python. The last patch doesn’t do > anything useful, but at least doesn’t break the existing testsuite (I > guess there is at least something to fix around there)… > > [...] > > Regards > > David > Ok - unfortunately, I suspect your last patch does not quite do what you wanted it do to. See below for comments. > [...] > > > 0002-britney.py-Add-support-for-versioned-Provides.patch > > > From 872c7dfb3d520fd93da2677c3091c3a59d825ff2 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?David=20Pr=C3=A9vot?= <da...@tilapin.org> > Date: Sun, 24 May 2015 10:43:06 -0400 > Subject: [PATCH 2/2] britney.py: Add support for versioned Provides > > --- > britney.py | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/britney.py b/britney.py > index 5c2171e..67b7e61 100755 > --- a/britney.py > +++ b/britney.py > @@ -989,11 +989,9 @@ class Britney(object): > for prov in binaries[1].get(name, []): > if prov not in binaries[0]: continue > package = binaries[0][prov] > - # A provides only satisfies: > - # - an unversioned dependency (per Policy Manual §7.5) > - # - a dependency without an architecture qualifier > - # (per analysis of apt code) > - if op == '' and version == '' and archqual is None: > + # A provides only satisfies a dependency without an > + # architecture qualifier (per analysis of apt code) > + if ((op == '' and version == '') or (op == '=' and version > != '')) and archqual is None: > packages.append(prov) > > return packages > -- 2.1.4 The "op" and "version" here are both from the dependency. From your test case, that would be: """ Package: pkg-b [...] Depends: pkg-c (>= 2.0), pkg-c (<< 3.0~) ^^^^^^ ^^^^^^^ """ With the patch any unversioned dependency on a virtual package OR (wrongly) a strictly equals version dependency on a virtual package will always be considered satisfied. I.e. Britney would now consider the following satisfied by pkg-a from your test case. """ Package: pkg-b [...] Depends: pkg-c (= 9999999) """ Sadly, there is no easy fix, because there are assumptions about provides being unversioned in multiple places in Britney. This will require a slightly larger fix and quite possibly a lot of fixes to internal data structures. Thanks, ~Niels -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org