When rolling back, cope with package names that are not regexp friendly

This commit is contained in:
Steve McIntyre 2006-12-11 15:47:18 +00:00
parent e1116e39e4
commit 277fc58f3d
1 changed files with 4 additions and 4 deletions

View File

@ -151,7 +151,7 @@ sub remove_Packages_entry {
$gz = gzopen("$pkgfile.gz", "wb9");
while (defined($match = <IFILE>)) {
if (! ($match =~ /^Package: $p$/m)) {
if (! ($match =~ /^Package: \Q$p\E$/m)) {
print OFILE $match;
$gz->gzwrite($match) or die "Failed to write $pkgfile.gz: $gzerrno\n";
}
@ -196,9 +196,9 @@ sub remove_md5_entry {
while (defined($match = <IFILE>)) {
$present = 0;
foreach my $entry (@fileslist) {
if (($match =~ /$entry$/m)) {
$present++;
}
if (($match =~ /\Q$entry\E$/m)) {
$present++;
}
}
if (!$present) {
print OFILE $match;