From 8e1bbc53451ef8a0d553e675c6c14af73d83a349 Mon Sep 17 00:00:00 2001 From: codehelp Date: Wed, 7 Apr 2010 13:33:14 +0000 Subject: [PATCH] Add explicit support for running preinst scripts in native mode. git-svn-id: http://emdebian.org/svn/current@7058 563faec7-e20c-0410-992a-a66f704d0ccd --- crosschroot.conf | 7 ++++--- debian/changelog | 3 ++- multistrap | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/crosschroot.conf b/crosschroot.conf index b8f5a4c..7d91a60 100644 --- a/crosschroot.conf +++ b/crosschroot.conf @@ -23,16 +23,17 @@ aptsources=Debian Toolchains packages=gcc-4.2-base source=http://ftp.uk.debian.org/debian keyring=debian-archive-keyring -suite=lenny +suite=stable [Debian] packages=dpkg-dev binutils-multiarch source=http://ftp.uk.debian.org/debian keyring=debian-archive-keyring -suite=sid +suite=stable [Toolchains] packages=g++-4.2-arm-linux-gnueabi linux-libc-dev-armel-cross source=http://www.emdebian.org/debian keyring=emdebian-archive-keyring -suite=lenny +suite=stable + diff --git a/debian/changelog b/debian/changelog index 3112053..410be5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ multistrap (2.1.0) experimental; urgency=low * Drop emsandbox and use experimental multistrap. * Add initial crosschroot.conf for multistrap support. * Add device-table.pl helper - internal support to follow. + * Add explicit support for running preinst scripts in native mode. - -- Neil Williams Tue, 06 Apr 2010 20:15:55 +0100 + -- Neil Williams Wed, 07 Apr 2010 14:21:42 +0100 emdebian-rootfs (2.0.9) unstable; urgency=low diff --git a/multistrap b/multistrap index cb57e71..9798736 100755 --- a/multistrap +++ b/multistrap @@ -629,6 +629,13 @@ sub native # check that we have a workable shell inside the chroot &check_bin_sh("$dir"); 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 @@ -1106,4 +1113,16 @@ rootfs. Only the packages specified manually in the configuration files will be used in the calculations - dependencies of those packages 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 configuration item as the version +of apt in Lenny and previous can only use the codename. + =cut