Add explicit support for running preinst scripts in native mode.

git-svn-id: http://emdebian.org/svn/current@7058 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2010-04-07 13:33:14 +00:00
parent 73def95a35
commit 8e1bbc5345
3 changed files with 25 additions and 4 deletions

View file

@ -23,16 +23,17 @@ aptsources=Debian Toolchains
packages=gcc-4.2-base packages=gcc-4.2-base
source=http://ftp.uk.debian.org/debian source=http://ftp.uk.debian.org/debian
keyring=debian-archive-keyring keyring=debian-archive-keyring
suite=lenny suite=stable
[Debian] [Debian]
packages=dpkg-dev binutils-multiarch packages=dpkg-dev binutils-multiarch
source=http://ftp.uk.debian.org/debian source=http://ftp.uk.debian.org/debian
keyring=debian-archive-keyring keyring=debian-archive-keyring
suite=sid suite=stable
[Toolchains] [Toolchains]
packages=g++-4.2-arm-linux-gnueabi linux-libc-dev-armel-cross packages=g++-4.2-arm-linux-gnueabi linux-libc-dev-armel-cross
source=http://www.emdebian.org/debian source=http://www.emdebian.org/debian
keyring=emdebian-archive-keyring keyring=emdebian-archive-keyring
suite=lenny suite=stable

3
debian/changelog vendored
View file

@ -4,8 +4,9 @@ multistrap (2.1.0) experimental; urgency=low
* Drop emsandbox and use experimental multistrap. * Drop emsandbox and use experimental multistrap.
* Add initial crosschroot.conf for multistrap support. * Add initial crosschroot.conf for multistrap support.
* Add device-table.pl helper - internal support to follow. * Add device-table.pl helper - internal support to follow.
* Add explicit support for running preinst scripts in native mode.
-- Neil Williams <codehelp@debian.org> Tue, 06 Apr 2010 20:15:55 +0100 -- Neil Williams <codehelp@debian.org> Wed, 07 Apr 2010 14:21:42 +0100
emdebian-rootfs (2.0.9) unstable; urgency=low emdebian-rootfs (2.0.9) unstable; urgency=low

View file

@ -629,6 +629,13 @@ sub native
# check that we have a workable shell inside the chroot # check that we have a workable shell inside the chroot
&check_bin_sh("$dir"); &check_bin_sh("$dir");
system ("$str $env chroot $dir dpkg --configure -a"); system ("$str $env chroot $dir dpkg --configure -a");
opendir (PRI, "${dir}/var/lib/dpkg/info") or return;
my @preinsts=grep(/\.preinst$/, readdir PRI);
closedir (PRI);
foreach my $script (sort @preinsts)
{
system ("$str $env chroot $dir /var/lib/dpkg/info/$script update");
}
} }
sub get_required_debs sub get_required_debs
@ -1106,4 +1113,16 @@ rootfs. Only the packages specified manually in the configuration
files will be used in the calculations - dependencies of those packages files will be used in the calculations - dependencies of those packages
will be added but no others. will be added but no others.
=head1 Collecting packages from specific codenames/suites.
Packages specified explicitly in the configuration sections will be
passed to apt as package/codename so that the configuration controls
which version of a package is installed should the package exist in
two sources with different suites.
When using this support in Lenny, ensure that each section uses the
codename (etch, lenny, squeeze, sid) instead of the suite (oldstable,
stable, testing, sid) for the C<suite> configuration item as the version
of apt in Lenny and previous can only use the codename.
=cut =cut