* Update make_disc_trees.pl and which_deb to cope with different

types of source file, and clean up the code in that area.
This commit is contained in:
Steve McIntyre 2011-03-23 17:26:03 +00:00
parent 86b6385f59
commit 8fb9de63de
3 changed files with 12 additions and 14 deletions

View File

@ -22,6 +22,8 @@ debian-cd (3.1.6) UNRELEASED-backport; urgency=low
* tools/start_new_disc: tone down messages about missing
{BASE,UDEB}_{INCLUDE,EXCLUDE} files from ERROR to WARNING.
Closes: #615043
* Update make_disc_trees.pl and which_deb to cope with different
types of source file, and clean up the code in that area.
-- Raphaël Hertzog <hertzog@debian.org> Fri, 04 Feb 2011 09:59:21 +0100

View File

@ -922,9 +922,8 @@ sub add_md5_entry {
if ($arch eq "source") {
m/^Directory: (\S+)/mi and $pdir = $1;
m/^ (\S+) (\S+) ((\S+).*dsc)/m and print MD5FILE "$1 ./$pdir/$3\n";
m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and print MD5FILE "$1 ./$pdir/$3\n";
m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and print MD5FILE "$1 ./$pdir/$3\n";
# Explicitly use the md5 lines in the Sources stanza, hence the xdigit(32) here
while (/^ ([[:xdigit:]]{32}) (\d+) (\S+)/msg) { print MD5FILE "$1 ./$pdir/$3\n"; }
} else {
m/^Filename: (\S+)/m and $file = $1;
m/^MD5sum: (\S+)/m and print MD5FILE "$1 ./$file\n";
@ -1023,10 +1022,9 @@ sub remove_md5_entry {
m/^Package: (\S+)/mi and $p = $1;
if ($arch eq "source") {
m/^Directory: (\S+)/mi and $pdir = $1;
m/^ (\S+) (\S+) ((\S+).*dsc)/m and push(@fileslist, "$1 ./$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and push(@fileslist, "$1 ./$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and push(@fileslist, "$1 ./$pdir/$3");
m/^Directory: (\S+)/mi and $pdir = $1;
# Explicitly use the md5 lines in the Sources stanza, hence the xdigit(32) here
while (/^ ([[:xdigit:]]{32}) (\d+) (\S+)/msg) { push(@fileslist, "$1 ./$pdir/$3"); }
} else {
m/^Filename: (\S+)/m and $file = $1;
m/^MD5Sum: (\S+)/mi and push(@fileslist, "$1 ./$file");
@ -1090,7 +1088,7 @@ sub add_packages {
}
my $pkg = shift;
my ($arch, $component, $pkgname, $pkgsize) = split /:/, $pkg;
my ($arch, $component, $pkgname, $pkgsize) = split /:/, $pkg;
if ("$arch" eq "" or "$pkgname" eq "" or "$pkgname" eq "") {
die "inconsistent data passed to add_packages: $pkg\n";
@ -1105,9 +1103,8 @@ sub add_packages {
if ($arch eq "source") {
m/^Directory: (\S+)/m and $pdir = $1;
$source=$security if $pdir=~m:updates/:;
m/^ (\S+) (\S+) ((\S+).*dsc)/m and push(@files, "$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and push(@files, "$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and push(@files, "$pdir/$3");
# Explicitly use the md5 lines in the Sources stanza, hence the xdigit(32) here
while (/^ ([[:xdigit:]]{32}) (\d+) (\S+)/msg) { push(@files, "$pdir/$3"); }
} else {
m/^Filename: (\S+)/mi and push(@files, $1);
$source=$security if $1=~m:updates/:;

View File

@ -127,9 +127,8 @@ if (length($pkgdata) > 2) {
if (length($pkgdata) > 2) {
my $dir;
$pkgdata =~ m/^Directory: (\S+)/m and $dir = $1;
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*dsc)/m and print "$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and print "$dir/$3\n";
$pkgdata =~ m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and print "$dir/$3\n";
# Explicitly use the md5 lines in the Sources stanza, hence the xdigit(32) here
while ($pkgdata =~ m/^ ([[:xdigit:]]{32}) (\d+) (\S+)/msg) { print "$dir/$3\n"; }
}
}
}