On Fri, 26 Jul 2013 17:22:42 +0200
Johannes Schauer <[email protected]> wrote:

> sorry, I forgot to write down how to reproduce this bug and
> apparently lacked enough clarity in my initial description. So here
> it goes:
> 
> To reproduce this bug add a aptpreferences line pointing to a valid
> pinning file like to any multistrap config which does NOT include
> suite X.  Then at the same time in your *host* system (the system
> which runs multistrap) modify your apt config so that the
> APT::Default-Release is suite X. Then try running that multistrap
> config. Here step by step with X being "testing":
> 
>       mkdir /tmp/multistraptest
>       cd /tmp/multistraptest
>       echo -ne "Package: *\nPin: release a=stable\nPin-Priority:
> 700\n" > 00pinning.pref echo -ne
> "[General]\ninclude=/usr/share/multistrap/squeeze.conf\naptpreferences=/tmp/multistraptest/00pinning.pref"
> > multistrap.conf echo 'APT::Default-Release "testing";' | sudo
> > tee /etc/apt/apt.conf.d/02default-release sudo multistrap -f
> > multistrap.conf -d debian-squeeze

Check the config_str which is always output by multistrap and run just
that command to apt. Add the APT::Default-Release=* option and see how
that changes things. There is no sane way for multistrap to know what
the default release would be, so the wildcard is the only option
without adding more complexity to the configuration.
 
>       $config_str .= " -o Dir::Etc=${dir}${etcdir} -o
> APT::Default-Release=*" if (not defined $preffile);

Try with the conditional removed (so that Default-Release is always set
to * whether a preferences file is used or not. This may be the actual
bug because I don't see a way in the apt *preferences* settings to
change Default-Release which is actually an apt *configuration* change.
Confusingly, apt has a completely separate setup for configuration
changes versus preference changes.

There are also problems here with apt pinning - pinning is supported
*after* install, not during the initial creation, at least that is
current apt behaviour. It is Default-Release which dictates which
packages get used for the initial install.

> So only if no aptpreferences are specified will the
> APT::Default-Release be set. This of course makes sense

Except it doesn't because Default-Release is a configuration setting
(as far as apt is concerned) and therefore cannot be affected by a
preferences file change.

Remember that to get a specific version of a package from a newer
release than the one specified as default, explicitsuite must be true
if the package exists at any version in the default release. Also, any
packages upon which that package has a strict dependency (i.e. = rather
than >=) must also be explicitly added to the packages line in the
stanza for the desired version, even though that package does not need
to be listed to get it from the default release. This is typical apt
behaviour and not a bug in multistrap.

Try the latest SVN with the aptdefaultrelease option in your [General]
section and see how that works.

http://www.emdebian.org/trac/changeset/8462

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: signature.asc
Description: PGP signature

Reply via email to