From d764a13c224e4f969c689978e3c6c5e22d2ea74c Mon Sep 17 00:00:00 2001 From: codehelp Date: Fri, 15 Oct 2010 15:37:01 +0000 Subject: [PATCH] fakeroot support for download and don't lowercase include filenames. git-svn-id: http://emdebian.org/svn/current@7554 563faec7-e20c-0410-992a-a66f704d0ccd --- multistrap | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/multistrap b/multistrap index aa2ac56..1fc428c 100755 --- a/multistrap +++ b/multistrap @@ -260,7 +260,13 @@ foreach my $pkg (values %keyrings) { if ((defined $k) and (not defined $noauth)) { printf (_g("I: Installing %s\n"), $k); # the keyring package must be available to the external apt - system ("apt-get -y -d --reinstall install $k"); + my $str = ""; + my $e=`LC_ALL=C printenv`; + if ($e !~ /\nFAKEROOTKEY=[0-9]+\n/) { + if (($e =~ /\nUSER=root\n/)) { + $str = "sudo" if (-f "/usr/bin/sudo"); + } + system ("$str apt-get -y -d --reinstall install $k"); foreach my $keyring_pkg (values %keyrings) { my @files=(); my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"`; @@ -859,7 +865,8 @@ sub cascade { push @debootstrap, @b; my @a = split (' ', lc($keys{$section}{'aptsources'})); push @aptsources, @a; - my @i = split (' ', lc($keys{$section}{'include'})); + my @i = split (' ', $keys{$section}{'include'}) + if (defined $keys{$section}{'include'}); foreach my $inc (@i) { # look for the full filepath or try same directory as current conf. if (not -f $inc) {