using apt-cache in autopkgtest and test cases
Martin Pitt
mpitt at debian.org
Fri Dec 30 14:24:50 UTC 2016
Hello Paul,
Paul Gevers [2016-12-29 22:13 +0100]:
> I now have a seemingly working version of autopkgtest locally where I
> generalized internals of --apt-pocket to --apt-release and convert the
> pocket call to a full release name.
Nice!
> During this work I found out that the preferences file (the apt pin
> file) is blindly assigning the release as found in /etc/apt/sources.list
> to the suite (a= field), while it could contain the codename (n= field).
I'm not very familiar with the difference, but I believe the difference is
exactly in what Launchpad calls "pockets" (I'm not aware of a corresponding
name in dak): I. e. a package from "stretch-updates" would have
a=stretch-updates, but still n=stretch, so that it seems to me that n= is not
sufficient for --apt-pocket.
> In my current implementation I parse the output of apt-cache to
> determine the the value for the a= field, but I learned that testing
> with apt-cache isn't trivial as it requires all kind of files with
> reasonable content in /var/lib/apt/lists/.
I'm not sure what you are trying to do, but ISTM that --apt-release might
actually use n= while --apt-pocket keeps using a=?
Also, if this is only for tests: I don't think it's a good idea to try and fake
the output of apt-cache -- for the SchrootRunner tests I'd actually use some
existing Debian releases/pockets such as stable vs. stable-updates.
> What do you think, should I just assume the same as the current
> implementation, i.e. a value that is valid for the a= field, or should I seek
> harder for an other way of checking
Can you please explain the actual problem? I don't think autopkgtest should try
and do any interpretation/dissection of the release -- it should pin the
archive name exactly to what you specify. Why doesn't this work?
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20161230/cb6c295f/attachment.sig>
More information about the autopkgtest-devel
mailing list