Debian Bug report logs - #678359
autopkgtest: Depends: @ only works when building the source

version graph

Package: autopkgtest; Maintainer for autopkgtest is Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>; Source for autopkgtest is src:autopkgtest.

Reported by: Martin Pitt <mpitt@debian.org>

Date: Thu, 21 Jun 2012 05:48:01 UTC

Severity: normal

Tags: patch

Found in version autopkgtest/2.2.0

Fixed in version autopkgtest/2.2.3

Done: Ian Jackson <ijackson@chiark.greenend.org.uk>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Thu, 21 Jun 2012 05:48:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
New Bug report received and forwarded. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 21 Jun 2012 05:48:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Debian BTS Submit <submit@bugs.debian.org>
Subject: autopkgtest: Depends: @ only works when building the source
Date: Thu, 21 Jun 2012 07:43:58 +0200
[Message part 1 (text/plain, inline)]
Package: autopkgtest
Version: 2.2.0

When you have a package which specifies "no-build-needed", then the
package build step is (correctly) skipped. However, in that case
t.act.binaries is not initialized and left at [], and thus the @
Depends expansion:

                        for (pkg,bin) in t.act.binaries:
                                dp = d.replace('@',pkg)
                                t._debug('  synthesised dependency '+dp)
                                dn.append(dp)

does not work. README.package-tests.gz says

  `@' stands for the package(s) generated by the source package
  containing the tests

and does not say that it only works when building the package.

This breaks test runs with e. g. 

  adt-run --no-built-binaries *.dsc --- adt-virt-null

We really do want --no-built-binaries by default, as otherwise we
would test the .debs generated in the local build, not the .debs from
the actual archive. But the point of these tests is to test what is
in the archive; that might be built differently than our local build.

IMHO the package list for @ should be generated from debian/control,
not from the generated .debs during a local build.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Thu, 21 Jun 2012 09:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 21 Jun 2012 09:15:06 GMT) Full text and rfc822 format available.

Message #10 received at 678359@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Thu, 21 Jun 2012 11:13:50 +0200
[Message part 1 (text/plain, inline)]
tag 678359 patch
thanks

Martin Pitt [2012-06-21  7:43 +0200]:
> IMHO the package list for @ should be generated from debian/control,
> not from the generated .debs during a local build.

Attached patch does that. I'm not quite sure about the handling of
t.act.tests_tree.path (it is -- erm -- not very easy to understand the
organization of all those AutoFile classes and their rather cryptic
members), but I tested it with running from an unpacked source tree
and from a .dsc, and it works fine now.

If you don't like the new debhelper dependency, we could also copy the
code, but it's quite a lot and not very easy. Pretty much every
package is going to install debhelper as a build dep anyway, though,
so I don't think it hurts.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[autopkgtest.at-depends.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Martin Pitt <mpitt@debian.org> to control@bugs.debian.org. (Thu, 21 Jun 2012 09:15:53 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Thu, 21 Jun 2012 16:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 21 Jun 2012 16:21:03 GMT) Full text and rfc822 format available.

Message #17 received at 678359@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Thu, 21 Jun 2012 18:11:04 +0200
[Message part 1 (text/plain, inline)]
Martin Pitt [2012-06-21 11:13 +0200]:
> Attached patch does that.

Version 2 of the patch, this now filters out udebs.

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[autopkgtest.at-depends.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Thu, 28 Jun 2012 00:03:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 28 Jun 2012 00:03:04 GMT) Full text and rfc822 format available.

Message #22 received at 678359@bugs.debian.org (full text, mbox):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Martin Pitt <mpitt@debian.org>, 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Thu, 28 Jun 2012 01:01:06 +0100
Martin Pitt writes ("Bug#678359: autopkgtest: Depends: @ only works when building the source"):
> Martin Pitt [2012-06-21 11:13 +0200]:
> > Attached patch does that.
> 
> Version 2 of the patch, this now filters out udebs.

Thanks for working on this.  Looking at it I'm not entirely clear that
the patch is right.  I'm quite tired right now and could be wrong but
it seems to me that we should be using the tree from the tree argument
to read_control.  This should probably become a new constructor
argument to Test (and correspondingly doesn't need to be an argument
to run_tests or indeed to Test.run).

And of course you should use tree.read() not tree.path[1].

(And, as a matter of style, Python `portability' stuff notwithstanding
I think the code is clearer if you avoid os.path.join and just say `/'
when you mean it.)

Is the parser in packages_from_source really correct ?  I don't think
it's a rule that the Package line must come before the others.
Perhaps it would be better to generalise the first half of
read_control until it can be reused (as a non-class function called
something like read_stanzas, I guess).

Thanks,
Ian.




Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Wed, 04 Jul 2012 15:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 04 Jul 2012 15:42:07 GMT) Full text and rfc822 format available.

Message #27 received at 678359@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Ian Jackson <ijackson@chiark.greenend.org.uk>, 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Wed, 4 Jul 2012 17:39:50 +0200
Hello Ian,

Ian Jackson [2012-06-28  1:01 +0100]:
> Thanks for working on this.  Looking at it I'm not entirely clear that
> the patch is right.  I'm quite tired right now and could be wrong but
> it seems to me that we should be using the tree from the tree argument
> to read_control.  This should probably become a new constructor
> argument to Test (and correspondingly doesn't need to be an argument
> to run_tests or indeed to Test.run).

Where "This" == the list of binaries that are being produced by this
source (as a new ctor argument)?

> And of course you should use tree.read() not tree.path[1].

Ah, thanks! Cf. That was not obvious to me.

> (And, as a matter of style, Python `portability' stuff notwithstanding
> I think the code is clearer if you avoid os.path.join and just say `/'
> when you mean it.)

It's an old habit of mine, but I'm happy to use / directly.


> Is the parser in packages_from_source really correct ?  I don't think
> it's a rule that the Package line must come before the others.

Indeed, just a convention.

> Perhaps it would be better to generalise the first half of
> read_control until it can be reused (as a non-class function called
> something like read_stanzas, I guess).

Will do that.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Wed, 04 Jul 2012 15:54:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 04 Jul 2012 15:54:08 GMT) Full text and rfc822 format available.

Message #32 received at 678359@bugs.debian.org (full text, mbox):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Martin Pitt <mpitt@debian.org>
Cc: 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Wed, 4 Jul 2012 16:51:34 +0100
Martin Pitt writes ("Re: Bug#678359: autopkgtest: Depends: @ only works when building the source"):
> Ian Jackson [2012-06-28  1:01 +0100]:
> > Thanks for working on this.  Looking at it I'm not entirely clear that
> > the patch is right.  I'm quite tired right now and could be wrong but
> > it seems to me that we should be using the tree from the tree argument
> > to read_control.  This should probably become a new constructor
> > argument to Test (and correspondingly doesn't need to be an argument
> > to run_tests or indeed to Test.run).
> 
> Where "This" == the list of binaries that are being produced by this
> source (as a new ctor argument)?

No, the tree.

> > And of course you should use tree.read() not tree.path[1].
> 
> Ah, thanks! Cf. That was not obvious to me.

NP.

> > (And, as a matter of style, Python `portability' stuff notwithstanding
> > I think the code is clearer if you avoid os.path.join and just say `/'
> > when you mean it.)
> 
> It's an old habit of mine, but I'm happy to use / directly.

Heh :-).

> > Perhaps it would be better to generalise the first half of
> > read_control until it can be reused (as a non-class function called
> > something like read_stanzas, I guess).
> 
> Will do that.

Thanks.

Ian.




Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Wed, 04 Jul 2012 16:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Wed, 04 Jul 2012 16:51:03 GMT) Full text and rfc822 format available.

Message #37 received at 678359@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Ian Jackson <ijackson@chiark.greenend.org.uk>, 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Wed, 4 Jul 2012 18:49:51 +0200
[Message part 1 (text/plain, inline)]
Hello Ian,

Ian Jackson [2012-07-04 16:51 +0100]:
> > Where "This" == the list of binaries that are being produced by this
> > source (as a new ctor argument)?
> 
> No, the tree.

I see. I haven't done that yet, but I agree it could improve the
structure a little.

> > > Perhaps it would be better to generalise the first half of
> > > read_control until it can be reused (as a non-class function called
> > > something like read_stanzas, I guess).

The updated patch does that now. I again tested it with an unpackaged
source (--built-tree=.) and a .dsc.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[autopkgtest.at-depends.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Thu, 05 Jul 2012 17:06:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Thu, 05 Jul 2012 17:06:05 GMT) Full text and rfc822 format available.

Message #42 received at 678359@bugs.debian.org (full text, mbox):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Martin Pitt <mpitt@debian.org>, 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Thu, 5 Jul 2012 18:03:31 +0100
Martin Pitt writes ("Bug#678359: autopkgtest: Depends: @ only works when building the source"):
> Ian Jackson [2012-07-04 16:51 +0100]:
> > > Where "This" == the list of binaries that are being produced by this
> > > source (as a new ctor argument)?
> > 
> > No, the tree.
> 
> I see. I haven't done that yet, but I agree it could improve the
> structure a little.

You have done most of what I suggested.  I like your patch, thanks.

Ian.




Information forwarded to debian-bugs-dist@lists.debian.org, Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>:
Bug#678359; Package autopkgtest. (Sun, 08 Jul 2012 22:27:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
Extra info received and forwarded to list. Copy sent to Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>. (Sun, 08 Jul 2012 22:27:13 GMT) Full text and rfc822 format available.

Message #47 received at 678359@bugs.debian.org (full text, mbox):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: Martin Pitt <mpitt@debian.org>, 678359@bugs.debian.org
Subject: Re: Bug#678359: autopkgtest: Depends: @ only works when building the source
Date: Sun, 8 Jul 2012 23:24:28 +0100
Ian Jackson writes ("Re: Bug#678359: autopkgtest: Depends: @ only works when building the source"):
> You have done most of what I suggested.  I like your patch, thanks.

After a bit more review and testing I found one bug in it, which I
have fixed.  I'm about to upload and push the result.

Thanks,
Ian.

commit d99016242cbb65bccd7c8dc71f60031ca027b9aa
Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date:   Sun Jul 8 22:57:03 2012 +0100

    adt-run: Fix for fix for #678359: when reading package list, do so using the host's copy of the control file

diff --git a/runner/adt-run b/runner/adt-run
index 0e30bd9..4d0a9b2 100755
--- a/runner/adt-run
+++ b/runner/adt-run
@@ -1355,7 +1355,7 @@ def determine_package(act):
 
 def packages_from_source(act, tree):
     (rc, output) = subprocess_cooked(['dh_listpackages'],
-            stdout=subprocess.PIPE, cwd=tree.read(True))
+            stdout=subprocess.PIPE, cwd=tree.read())
     if rc: badpkg('failed to parse packages built from source, code %d' % rc)
 
     # filter out empty lines




Reply sent to Ian Jackson <ijackson@chiark.greenend.org.uk>:
You have taken responsibility. (Sun, 08 Jul 2012 22:36:07 GMT) Full text and rfc822 format available.

Notification sent to Martin Pitt <mpitt@debian.org>:
Bug acknowledged by developer. (Sun, 08 Jul 2012 22:36:07 GMT) Full text and rfc822 format available.

Message #52 received at 678359-close@bugs.debian.org (full text, mbox):

From: Ian Jackson <ijackson@chiark.greenend.org.uk>
To: 678359-close@bugs.debian.org
Subject: Bug#678359: fixed in autopkgtest 2.2.3
Date: Sun, 08 Jul 2012 22:32:09 +0000
Source: autopkgtest
Source-Version: 2.2.3

We believe that the bug you reported is fixed in the latest version of
autopkgtest, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 678359@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ian Jackson <ijackson@chiark.greenend.org.uk> (supplier of updated autopkgtest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 08 Jul 2012 23:15:42 +0100
Source: autopkgtest
Binary: autopkgtest autopkgtest-xenlvm
Architecture: source all
Version: 2.2.3
Distribution: sid
Urgency: medium
Maintainer: Autopkgtest team <autopkgtest-devel@lists.alioth.debian.org>
Changed-By: Ian Jackson <ijackson@chiark.greenend.org.uk>
Description: 
 autopkgtest - automatic as-installed testing for Debian packages
 autopkgtest-xenlvm - Xen/LVM2 based testbed snapshot system
Closes: 678359
Changes: 
 autopkgtest (2.2.3) unstable; urgency=medium
 .
   [ Martin Pitt ]
   * Make `@' in tests' Depends work even if we're not building the
     source tree.  Closes: #678359.  This is an important bugfix.
Checksums-Sha1: 
 d69e1a790a1d999d3c5be9da88741f1ff4b4cf40 1340 autopkgtest_2.2.3.dsc
 19ee3141370b93aab1f5619aa4de8d28c70a5e0e 76841 autopkgtest_2.2.3.tar.gz
 bd65bb7961b0b754ea753604a13c79c9fabd4867 65920 autopkgtest_2.2.3_all.deb
 6330c24302b42f53ab6b703f7140c1c9bd6819c9 26732 autopkgtest-xenlvm_2.2.3_all.deb
Checksums-Sha256: 
 f74709e0dba04ad45a5c8f40a1b2a3ab18ca8992d6d5fbb729df5349dddd7995 1340 autopkgtest_2.2.3.dsc
 e9c37d51d1d110f5ea23c2bb1ebeeb8034db3af9cbe55ca52a1b67740bf8d7f7 76841 autopkgtest_2.2.3.tar.gz
 2c0b501cd13837689054cb2a3ef829bbae693432da053481122f4087a2021d3b 65920 autopkgtest_2.2.3_all.deb
 fb1f28afe8a61a02b74b18af66f4633ae7ae0d6b32701754c13708b7fdf7286a 26732 autopkgtest-xenlvm_2.2.3_all.deb
Files: 
 29933938fc5374e9c2cb57b947ba284f 1340 devel optional autopkgtest_2.2.3.dsc
 81fe6609bba26f0bf628a561ffd83c1c 76841 devel optional autopkgtest_2.2.3.tar.gz
 a68a74a530c3854b98e456a9ba041fad 65920 devel optional autopkgtest_2.2.3_all.deb
 1d8a038855e8e1eb70b2e19bcdb9ab99 26732 devel optional autopkgtest-xenlvm_2.2.3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJP+gkjAAoJEOPjOSNItQ0501oH/ioZRPKxTnl/DrnyVVaONgK6
3z0Wo7vmJ2GgXD1r8wRmJDYgI6379GXrDo4Lv8DzPzsMrFJJ4+Hu+DIqWbRtTHm7
5nj++rvvTouBikV5p3mh6dVvoJnbFtJSV+e8W4Xk0hbMcXwqzz3X+teZHwEKZMdQ
BH5mcjqqerhGNvOWldKTziPJfAh2ftoULFJgvq2pOr2tpErPV9afvZffjfLoSGrW
mTRZwZlWpDVzav9HIk4OVAjHnz4Jb2naXFp+LIKVBieZRUBXozbXgtS1XVgxraWu
enrzjnTqi4joaHYk3iucvZla5NBRAFBUwy6RA6PfRWJM615jB9UMeYpDQAswgmg=
=aR/1
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 22 Aug 2012 07:37:00 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 08:03:52 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.