Improve source download method to get packages individually - avoids breakage if the repository is incomplete.
git-svn-id: http://emdebian.org/svn/current@7963 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
2f9e921109
commit
9da8725e4a
2 changed files with 15 additions and 7 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -12,8 +12,10 @@ multistrap (2.1.13) unstable; urgency=low
|
||||||
* Use perl realpath support and drop dependency.
|
* Use perl realpath support and drop dependency.
|
||||||
* [INTL:da] Add Danish translation of multistrap documentation
|
* [INTL:da] Add Danish translation of multistrap documentation
|
||||||
(Closes: #619069)
|
(Closes: #619069)
|
||||||
|
* Improve source download method to get packages individually - avoids
|
||||||
|
breakage if the repository is incomplete.
|
||||||
|
|
||||||
-- Neil Williams <codehelp@debian.org> Sat, 05 Mar 2011 15:04:33 +0000
|
-- Neil Williams <codehelp@debian.org> Thu, 31 Mar 2011 16:37:48 +0100
|
||||||
|
|
||||||
multistrap (2.1.12) unstable; urgency=low
|
multistrap (2.1.12) unstable; urgency=low
|
||||||
|
|
||||||
|
|
18
multistrap
18
multistrap
|
@ -19,7 +19,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use IO::File;
|
use IO::File;
|
||||||
use Config::Auto;
|
use Config::Auto;
|
||||||
use Cwd qw (realpath);
|
use Cwd qw (realpath getcwd);
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use Parse::Debian::Packages;
|
use Parse::Debian::Packages;
|
||||||
use POSIX qw(locale_h);
|
use POSIX qw(locale_h);
|
||||||
|
@ -355,7 +355,6 @@ foreach my $a (@s) {
|
||||||
$uniq{$a}++;
|
$uniq{$a}++;
|
||||||
}
|
}
|
||||||
$str = join (' ', sort keys %uniq);
|
$str = join (' ', sort keys %uniq);
|
||||||
@dsclist = sort keys %uniq;
|
|
||||||
print "apt-get -y $config_str install $str\n";
|
print "apt-get -y $config_str install $str\n";
|
||||||
$retval = 0;
|
$retval = 0;
|
||||||
$retval = system ("apt-get -y $config_str install $str");
|
$retval = system ("apt-get -y $config_str install $str");
|
||||||
|
@ -524,9 +523,12 @@ sub force_unpack {
|
||||||
printf (_g("I: Extracting %s...\n"), $deb);
|
printf (_g("I: Extracting %s...\n"), $deb);
|
||||||
my $ver=`LC_ALL=C dpkg -f ./${cachedir}archives/$deb Version`;
|
my $ver=`LC_ALL=C dpkg -f ./${cachedir}archives/$deb Version`;
|
||||||
my $pkg=`LC_ALL=C dpkg -f ./${cachedir}archives/$deb Package`;
|
my $pkg=`LC_ALL=C dpkg -f ./${cachedir}archives/$deb Package`;
|
||||||
|
my $src=`LC_ALL=C dpkg -f ./${cachedir}archives/$deb Source`;
|
||||||
chomp ($ver);
|
chomp ($ver);
|
||||||
chomp ($pkg);
|
chomp ($pkg);
|
||||||
push @dsclist, $pkg;
|
chomp ($src);
|
||||||
|
$src =~ s/ \(.*\)//;
|
||||||
|
push @dsclist, $src;
|
||||||
mkdir ("./tmp");
|
mkdir ("./tmp");
|
||||||
my $tmpdir = `mktemp -p ./tmp -d -t multistrap.XXXXXX`;
|
my $tmpdir = `mktemp -p ./tmp -d -t multistrap.XXXXXX`;
|
||||||
chomp ($tmpdir);
|
chomp ($tmpdir);
|
||||||
|
@ -732,9 +734,13 @@ sub tidy_apt {
|
||||||
foreach my $a (@dsclist) {
|
foreach my $a (@dsclist) {
|
||||||
$uniqdsc{$a}++;
|
$uniqdsc{$a}++;
|
||||||
}
|
}
|
||||||
my $str = join (" ", sort keys %uniqdsc);
|
my $olddir = getcwd();
|
||||||
print "(cd $sourcedir; apt-get -d $config_str source $str)";
|
chdir ($sourcedir);
|
||||||
system ("(cd $sourcedir; apt-get -d $config_str source $str)");
|
print "apt-get -d config_str source " . join (" ", sort keys %uniqdsc) . "\n";
|
||||||
|
foreach my $srcpkg (sort keys %uniqdsc) {
|
||||||
|
system ("apt-get -d $config_str source $srcpkg");
|
||||||
|
}
|
||||||
|
chdir ($olddir);
|
||||||
}
|
}
|
||||||
unlink ("${dir}etc/apt/sources.list")
|
unlink ("${dir}etc/apt/sources.list")
|
||||||
if (-f "${dir}etc/apt/sources.list");
|
if (-f "${dir}etc/apt/sources.list");
|
||||||
|
|
Loading…
Reference in a new issue