Download source packages for all binaries, if a source directory is set.

git-svn-id: http://emdebian.org/svn/current@7261 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2010-05-31 19:18:16 +00:00
parent 2b6bcf3f83
commit 6d29417ef1
2 changed files with 25 additions and 21 deletions

4
debian/changelog vendored
View file

@ -14,8 +14,10 @@ multistrap (2.1.5) unstable; urgency=low
* Handle fakeroot with native architectures. * Handle fakeroot with native architectures.
* Extend device table format to support creating symlinks and * Extend device table format to support creating symlinks and
hardlinks. hardlinks.
* Download source packages for all binaries, if a source directory is
set.
-- Neil Williams <codehelp@debian.org> Mon, 31 May 2010 18:15:06 +0100 -- Neil Williams <codehelp@debian.org> Mon, 31 May 2010 20:15:56 +0100
multistrap (2.1.4) unstable; urgency=low multistrap (2.1.4) unstable; urgency=low

View file

@ -652,26 +652,11 @@ sub check_bin_sh
sub tidy_apt sub tidy_apt
{ {
print _g("I: Tidying up apt cache and list data.\n"); print _g("I: Tidying up apt cache and list data.\n");
if ($unpack eq "true") if (defined $sourcedir) {
{ my $str = join (" ", @dsclist);
opendir (DEBS, "${dir}${cachedir}/archives/") print "$str\n";
or die (_g("Cannot read apt archives directory.\n")); print "(cd $sourcedir; apt-get -d $config_str source $str)";
my @files=grep(!m:\.\.?$:, readdir DEBS); system ("(cd $sourcedir; apt-get -d $config_str source $str)");
closedir (DEBS);
foreach my $file (@files)
{
next if (-d $file);
next unless ($file =~ /\.deb$/);
if (defined $sourcedir) {
system ("mv ${dir}${cachedir}archives/$file $sourcedir/$file");
my $str = join (" ", @dsclist);
print "$str\n";
print "(cd $sourcedir; apt-get -d $config_str source $str)";
system ("(cd $sourcedir; apt-get -d $config_str source $str)");
} else {
unlink ("${dir}${cachedir}archives/$file");
}
}
} }
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");
@ -694,6 +679,23 @@ sub tidy_apt
next unless ($file =~ /\.bin$/); next unless ($file =~ /\.bin$/);
unlink ("${dir}${cachedir}$file"); unlink ("${dir}${cachedir}$file");
} }
if ($unpack eq "true")
{
opendir (DEBS, "${dir}${cachedir}/archives/")
or die (_g("Cannot read apt archives directory.\n"));
my @files=grep(!m:\.\.?$:, readdir DEBS);
closedir (DEBS);
foreach my $file (@files)
{
next if (-d $file);
next unless ($file =~ /\.deb$/);
if (defined $sourcedir) {
system ("mv ${dir}${cachedir}archives/$file $sourcedir/$file");
} else {
unlink ("${dir}${cachedir}archives/$file");
}
}
}
} }
# if native arch, do a few tasks just because we can and probably should. # if native arch, do a few tasks just because we can and probably should.