From f5d786c755b0cdc3eb1dd7a26f1af70b5a2bc664 Mon Sep 17 00:00:00 2001 From: codehelp Date: Mon, 5 Apr 2010 22:25:24 +0000 Subject: [PATCH] Add initial crosschroot.conf for multistrap support. git-svn-id: http://emdebian.org/svn/current@7050 563faec7-e20c-0410-992a-a66f704d0ccd --- crosschroot.conf | 38 ++++++++++++++++++++++++++++++++++++++ debian/changelog | 3 ++- multistrap | 16 +++++++++++----- 3 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 crosschroot.conf diff --git a/crosschroot.conf b/crosschroot.conf new file mode 100644 index 0000000..b8f5a4c --- /dev/null +++ b/crosschroot.conf @@ -0,0 +1,38 @@ +# Example multistrap configuration file for a cross chroot for armel +# Need to use cascading to select the toolchain for the requested arch. + +[General] +arch= +directory= +# same as --tidy-up option if set to true +cleanup=true +# same as --no-auth option if set to true +# keyring packages listed in each debootstrap will +# still be installed. +noauth=false +# extract all downloaded archives (default is true) +unpack=true +# the order of sections is not important. +# the debootstrap option determines which repository +# is used to calculate the list of Priority: required packages. +debootstrap=Debian Base Toolchains +aptsources=Debian Toolchains + +# Lenny toolchains need -base from Lenny. +[Base] +packages=gcc-4.2-base +source=http://ftp.uk.debian.org/debian +keyring=debian-archive-keyring +suite=lenny + +[Debian] +packages=dpkg-dev binutils-multiarch +source=http://ftp.uk.debian.org/debian +keyring=debian-archive-keyring +suite=sid + +[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 diff --git a/debian/changelog b/debian/changelog index 17b809f..1f6259d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ multistrap (2.1.0) experimental; urgency=low * Experimental branch to replace pbuilder support in Crush. * Drop emsandbox and use experimental multistrap. + * Add initial crosschroot.conf for multistrap support. - -- Neil Williams Mon, 05 Apr 2010 20:46:43 +0100 + -- Neil Williams Mon, 05 Apr 2010 23:20:08 +0100 emdebian-rootfs (2.0.9) unstable; urgency=low diff --git a/multistrap b/multistrap index 4ddd8ed..cb57e71 100755 --- a/multistrap +++ b/multistrap @@ -27,9 +27,9 @@ use Locale::gettext; use vars qw/ $progname $ourversion $dstrap $extra @aptsources $mirror @archives $deb $cachedir $config_str %packages $retval $str $retries $dir $include $arch $foreign $suite $url $unpack $sourcedir $msg $etcdir - @e $sourcesname $libdir $dpkgdir @debootstrap %suites %components + @e $sourcesname $libdir $dpkgdir @debootstrap %suites %components $chk $component $repo @dirs @touch %sources $section %keys $host $key $value - $type $file $config $tidy $noauth $keyring %keyrings $deflist + $type $file $config $tidy $noauth $keyring %keyrings $deflist $cfgdir @extrapkgs @includes %source $setupsh $configsh $omitrequired /; setlocale(LC_MESSAGES, ""); @@ -93,7 +93,7 @@ foreach my $inc (@includes) printf (_g("%s %s using %s\n"), $progname, $ourversion, $file); $host = `dpkg-architecture -qDEB_BUILD_ARCH`; chomp ($host); -if (not defined $arch) +if ((not defined $arch) or ($arch eq "")) { $arch = $host; printf (_g("Defaulting architecture to native: %s\n"),$arch); @@ -283,19 +283,25 @@ my @s = (); $str = ""; if (not defined $omitrequired) { + print "Calculating required packages.\n"; my $required = &get_required_debs; $str .= join (' ', @$required); chomp($str); } +$str .= " "; +# instruct apt to get packages from the specified +# suites (when the package exists in more than one). foreach my $sect (sort keys %packages) { my @list = split (' ', $sect); foreach my $pkg (@list) { - $str .= "$pkg/$suites{$sect} "; + next if ($packages{$pkg} =~ /^\s*$/); + # remove a duplicate from required list. + $str =~ s/$packages{$pkg}//; + $str .= "$packages{$pkg}/$suites{$sect} "; } } -#$str .= " " . join (' ', values %packages) . " "; chomp($str); $str .= " " . join (' ', values %keyrings) . " "; chomp($str);