From 7fffa79748d1c894cd2989f6cbea1021292cf918 Mon Sep 17 00:00:00 2001 From: codehelp Date: Mon, 23 Nov 2009 21:25:46 +0000 Subject: [PATCH] Avoid uninitialised array if no extra packages are specified. git-svn-id: http://emdebian.org/svn/current@6701 563faec7-e20c-0410-992a-a66f704d0ccd --- em_multistrap | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/em_multistrap b/em_multistrap index 4c4a426..2e0c587 100755 --- a/em_multistrap +++ b/em_multistrap @@ -326,14 +326,21 @@ if (-l "${dir}lib64" ) { } exit 0; +# lenny grip-config misses gcc-4.2-base, needs: +# touch /usr/share/doc/gcc-4.2-base/.changelog.Debian.gz +# touch /usr/share/doc/gcc-4.2-base/.changelog.Debian.gz + sub add_extra_packages { $str = join (' ', @extrapkgs); - print "apt-get -y $config_str install $str\n"; - $retval = system ("apt-get -y $config_str install $str"); - &force_unpack (@extrapkgs) if ($unpack eq "true"); - system ("touch ${dir}${libdir}lists/lock"); - &native if (not defined ($foreign)); + if (@extrapkgs) + { + print "apt-get -y $config_str install $str\n"; + $retval = system ("apt-get -y $config_str install $str"); + &force_unpack (@extrapkgs) if ($unpack eq "true"); + system ("touch ${dir}${libdir}lists/lock"); + &native if (not defined ($foreign)); + } } sub force_unpack