Add option to specify the apt default release directly and change the manpage content to advise on how this further complicates the permutations of apt configuration. Add commands to direct apt at the apt.conf.d and preferences.d directories within the chroot. (Closes: #717886)

git-svn-id: http://emdebian.org/svn/current@8462 563faec7-e20c-0410-992a-a66f704d0ccd
main
codehelp 11 years ago
parent e971dbc042
commit 2fc31ead13

10
debian/changelog vendored

@ -1,3 +1,13 @@
multistrap (2.2.0) unstable; urgency=low
* Add option to specify the apt default release directly and
change the manpage content to advise on how this further
complicates the permutations of apt configuration. Add
commands to direct apt at the apt.conf.d and preferences.d
directories within the chroot. (Closes: #717886)
-- Neil Williams <codehelp@debian.org> Sat, 27 Jul 2013 15:50:01 +0100
multistrap (2.1.23) unstable; urgency=low
* Carry changes from experimental into unstable.

2
debian/control vendored

@ -5,7 +5,7 @@ Maintainer: Neil Williams <codehelp@debian.org>
Uploaders: Wookey <wookey@debian.org>
Build-Depends: cdbs, debhelper (>= 7), po4a (>= 0.37.1)
Build-Depends-Indep: intltool
Standards-Version: 3.9.3
Standards-Version: 3.9.4
Homepage: http://www.emdebian.org/multistrap
Vcs-Browser: http://www.emdebian.org/trac/browser/current/
Vcs-Svn: http://www.emdebian.org/svn/current/

@ -30,6 +30,8 @@ omitpreinst=false
# apt preferences file
# aptpreferences=pref.conf
aptpreferences=
# explicitly set the APT::Default-Release (default is *)
aptdefaultrelease=
# download the sources for the packages downloaded
retainsources=false
# allow Recommended packages to be seen as strict dependencies

@ -36,12 +36,13 @@ use vars qw/ $progname $ourversion $dstrap $extra @aptsources
$explicit_suite $allow_recommends %omitdebsrc @dsclist @sectoutput
%flatfile %important $addimportant @debconf $hookdir %hooks
$warn_count $use_shortcut @foreignarches $olddpkg $ignorenative
%foreignpkgs $markauto /;
%foreignpkgs $markauto $default_release /;
setlocale(LC_MESSAGES, "");
textdomain("multistrap");
$progname = basename($0);
$ourversion = &our_version();
$default_release = "*";
$unpack = "true";
%omitdebsrc=();
%foreignpkgs=();
@ -338,8 +339,11 @@ $config_str .= " -o Apt::Get::Download-Only=true";
$config_str .= " -o Apt::Install-Recommends=false"
if (not defined $allow_recommends);
$config_str .= " -o Dir=$dir";
$config_str .= " -o Dir::Etc=${dir}${etcdir} -o APT::Default-Release=*"
if (not defined $preffile);
$config_str .= " -o Dir::Etc=${dir}${etcdir}";
$config_str .= " -o Dir::Etc::Parts=${dir}${etcdir}apt.conf.d/";
$config_str .= " -o Dir::Etc::PreferencesParts=${dir}${etcdir}preferences.d/";
$config_str .= " -o APT::Default-Release=$default_release";
# if (not defined $preffile);
if (defined $deflist) {
$sourcesname = "sources.list.d/multistrap.sources.list";
$config_str .= " -o Dir::Etc::SourceList=${dir}${etcdir}$sourcesname";
@ -1182,6 +1186,8 @@ sub cascade {
($keys{$section}{'explicitsuite'} eq "true"));
$allow_recommends++ if ((defined $keys{$section}{'allowrecommends'}) and
($keys{$section}{'allowrecommends'} eq "true"));
$default_release = lc($keys{$section}{'aptdefaultrelease'})
if (defined $keys{$section}{'aptdefaultrelease'});
my @p = split(' ', lc($keys{$section}{'debconfseed'}))
if (defined $keys{$section}{'debconfseed'});
foreach my $f (@p) {

@ -129,6 +129,9 @@ http://wiki.debian.org/Multistrap
http://www.emdebian.org/multistrap/
C<multistrap> includes an example configuration file with a full list
of all supported config file options: F</usr/share/doc/multistrap/examples/full.conf>
=head1 Shortcuts
In a similar manner to C<debootstrap>, C<multistrap> supports referring
@ -553,10 +556,33 @@ to use typical Debian behaviour.
=head1 Default release
If your system specifies a default-release for apt, this can cause
problems when trying to create a bootstrap which does not include
the default suite. To counter this, C<multistrap> sets a wildcard for
the Default Release within the bootstrap. See also: apt preferences.
C<multistrap> supports an option to explicitly set the default release
to use with apt: C<aptdefaultrelease>. This determines which release apt
will use for the base system packages and is not the same as pinning
(which relates to the use of apt after installation). Multistrap sets
the default-release to the wildcard * unless a release is named in the
C<aptdefaultrelease> field. Any release specified here must also be
defined in a stanza referenced in the bootstrap list or apt will fail.
To install a specific version of a package from a newer release than
the one specified as default, C<explicitsuite> must also be set to 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 is not a bug in multistrap.
The combination of default release, explicit suite and apt preferences
can quickly become complex and bugs can be very hard to identify.
C<multistrap> always outputs the complete apt command line, so test
this command yourself (using the files written out by C<multistrap>) to
see what is going on. Remember that all dependency resolution and all
the logic to determine which version of a specific package gets installed
in your C<multistrap> chroot is entirely down to apt and all C<multistrap>
can do is pass files and command line options to apt.
See also: apt preferences.
=head1 Explicit suite specification

Loading…
Cancel
Save