Disable pattern metacharacters in some regex with included variables.

Closes: #413506
This commit is contained in:
Raphaël Hertzog 2007-03-05 16:09:46 +00:00
parent 7b1b3973f8
commit 46369d0dc5
2 changed files with 8 additions and 4 deletions

6
debian/changelog vendored
View File

@ -37,7 +37,11 @@ debian-cd (3.0.1) UNRELEASED; urgency=low
* Updated isolinux.bin to the version from syslinux 3.31-3.
* Re-enable use of 64 bit detection, fixed now.
-- Joey Hess <joeyh@debian.org> Thu, 1 Mar 2007 14:17:09 -0500
[ Raphael Hertzog ]
* Fix make_disc_trees.pl to not clash on unexcluded packages which contains
regex special characters. Closes: #413506
-- Raphael Hertzog <hertzog@debian.org> Mon, 5 Mar 2007 17:00:44 +0100
debian-cd (3.0.0) unstable; urgency=medium

View File

@ -159,7 +159,7 @@ while (defined (my $pkg = <INLIST>)) {
foreach my $reinclude_pkg (@excluded_package_list) {
my ($arch, $pkgname) = split /:/, $reinclude_pkg;
foreach my $entry (@unexclude_packages) {
if (($pkgname =~ /^$entry$/m)) {
if (($pkgname =~ /^\Q$entry\E$/m)) {
print LOG "Re-including $reinclude_pkg due to match on \"\^$entry\$\"\n";
$guess_size = int($hfs_mult * add_packages($cddir, $reinclude_pkg));
$size += $guess_size;
@ -243,7 +243,7 @@ sub should_exclude_package {
my $should_exclude = 0;
foreach my $entry (@exclude_packages) {
if (($pkgname =~ /^$entry$/m)) {
if (($pkgname =~ /^\Q$entry\E$/m)) {
print LOG "Excluding $pkg due to match on \"\^$entry\$\"\n";
$should_exclude++;
}
@ -254,7 +254,7 @@ sub should_exclude_package {
# exclude the package at the same time. If so, complain and
# bail out
foreach my $entry (@unexclude_packages) {
if (($pkgname =~ /^$entry$/m)) {
if (($pkgname =~ /^\Q$entry\E$/m)) {
print LOG "But ALSO asked to unexclude $pkg due to match on \"\^$entry\$\"\n";
print LOG "Make your mind up! Bailing out...\n";
die "Incompatible exclude/unexclude entries for $pkg...\n";