diff --git a/debian/changelog b/debian/changelog index 39e8098..1c602a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ multistrap (2.1.12) unstable; urgency=low * Fix hook implementation if no hooks in use * Accumulate warnings from system calls and hooks and report to user at the end of the operation. + * Ensure that realpath does really exist (local test debugging) and + guard against an undefined keyring pkg variable. - -- Neil Williams Tue, 08 Feb 2011 20:38:33 +0000 + -- Neil Williams Wed, 09 Feb 2011 17:19:37 +0000 multistrap (2.1.11) unstable; urgency=low diff --git a/multistrap b/multistrap index 8326a3f..410df54 100755 --- a/multistrap +++ b/multistrap @@ -78,6 +78,10 @@ die ($msg) if (not defined $file); undef ($msg); +my $realpath = `which realpath`; +chomp ($realpath); +die (_g("ERR: Unable to find realpath - missing dependency.\n")) if (not -x ($realpath)); + $cachedir = "var/cache/apt/"; # archives $libdir = "var/lib/apt/"; # lists $etcdir = "etc/apt/"; # sources @@ -256,6 +260,7 @@ if ((defined $k) and (not defined $noauth)) { } system ("$str apt-get -y -d --reinstall install $k"); foreach my $keyring_pkg (values %keyrings) { + next if (not defined $keyring_pkg); my @files=(); my $file = `find /var/cache/apt/archives/ -name "$keyring_pkg*"|grep -m1 $keyring_pkg`; chomp ($file);