diff --git a/multistrap b/multistrap index 69d58ce..6911f17 100755 --- a/multistrap +++ b/multistrap @@ -41,7 +41,6 @@ sub main { setlocale(LC_MESSAGES, ""); textdomain("multistrap"); my $progname = basename($0); - my $ourversion = &our_version(); $default_release = "*"; $unpack = "true"; %omitdebsrc=(); @@ -96,8 +95,8 @@ sub main { my $cfgdir=dirname($file); cascade($file); -# Translators: fields are programname, version string, include file. - printf (_g("%s %s using %s\n"), $progname, $ourversion, $file); +# Translators: fields are programname, include file. + printf (_g("%s using %s\n"), $progname, $file); $host = `dpkg --print-architecture`; chomp($host); foreach my $inc (@includes) { @@ -124,8 +123,8 @@ sub main { &dump_config; exit 0; } -# Translators: fields are: programname, versionstring, configfile. - printf (_g("%s %s using %s\n"), $progname, $ourversion, $file); +# Translators: fields are: programname, configfile. + printf (_g("%s using %s\n"), $progname, $file); if ((not defined $arch) or ($arch eq "")) { $arch = $host; printf (_g("Defaulting architecture to native: %s\n"),$arch); @@ -1077,10 +1076,7 @@ sub prepare_sources_list { sub usageversion { my $progname = basename($0); - my $ourversion = &our_version(); printf STDERR (_g(" -%s version %s - Usage: %s [-a ARCH] [-d DIR] -f CONFIG_FILE %s -?|-h|--help|--version @@ -1146,7 +1142,7 @@ General settings: 'directory' specifies the top level directory where the bootstrap will be created - it is not packed into a .tgz once complete. -"), $progname, $ourversion, $progname, $progname, $progname) +"), $progname, $progname, $progname) or die ("$progname: ". _g("failed to write usage:") . "$!\n"); } @@ -1325,6 +1321,13 @@ sub cascade { uniq_sort (\@extrapkgs); } +# returns zero on success, non-zero on fail +sub check_multiarch_dpkg { + my $retval = system ("dpkg --print-foreign-architectures > /dev/null 2>&1"); + $retval >>=8; + return $retval; +} + sub system_fatal { my $cmd = shift; my $retval = system ("$cmd");