From 46369d0dc5df2703f9f81673760c3ba42a1a7786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Mon, 5 Mar 2007 16:09:46 +0000 Subject: [PATCH] Disable pattern metacharacters in some regex with included variables. Closes: #413506 --- debian/changelog | 6 +++++- tools/make_disc_trees.pl | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 908ba986..4f068198 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Mon, 5 Mar 2007 17:00:44 +0100 debian-cd (3.0.0) unstable; urgency=medium diff --git a/tools/make_disc_trees.pl b/tools/make_disc_trees.pl index a5f7654c..bb56a884 100755 --- a/tools/make_disc_trees.pl +++ b/tools/make_disc_trees.pl @@ -159,7 +159,7 @@ while (defined (my $pkg = )) { 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";