From 149f09e1abbe88b28807f0cdbfef7a6bd3e36cfa Mon Sep 17 00:00:00 2001 From: codehelp Date: Wed, 26 May 2010 21:37:03 +0000 Subject: [PATCH] add a warning about old apt. git-svn-id: http://emdebian.org/svn/current@7234 563faec7-e20c-0410-992a-a66f704d0ccd --- multistrap | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/multistrap b/multistrap index f4c8f00..854f6ec 100755 --- a/multistrap +++ b/multistrap @@ -938,6 +938,26 @@ sub cascade } @reinstall=(); @reinstall=sort keys %uniq; + # check for old versions of apt, <= 0.7.20.2+lenny1 + my $aptVer = `dpkg-query -W -f='\${Version}' apt`; + if (defined $aptVer and ($aptVer ne "")) { + chomp ($aptVer); + my $retval = system ("dpkg --compare-versions $aptVer '>>' 0.7.20.2+lenny1"); + $retval /= 256; + if ($retval == 1) { + foreach my $key (sort keys %suites) { + if (($suites{$key} =~ /lenny/) + or ($suites{$key} =~ /squeeze/) + or ($suites{$key} =~ /sid/) + or ($suites{$key} =~ /etch/)) { + my $msg = sprintf (_g("Your version of apt is too old to support using a suitename like '%s'.\n" . + "You MUST use the suite and multistrap is unable to guess which one you meant.\n" . + "Use one of: oldstable, stable, stable-proposed-updates, testing, unstable or experimental.\n"), $suites{$key}); + die ($msg); + } + } + } + } } sub _g {