The attached patch, made against the public Subversion branch,
addresses this bug by implementing (and documenting) a default dirname
regex of ‘PACKAGE(-.+)?’ in all occurrences in ‘devscripts’.

-- 
 \       “Faith, n. Belief without evidence in what is told by one who |
  `\   speaks without knowledge, of things without parallel.” —Ambrose |
_o__)                           Bierce, _The Devil's Dictionary_, 1906 |
Ben Finney <b...@benfinney.id.au>
=== modified file 'conf.default.in'
--- conf.default.in	2009-03-04 13:24:44 +0000
+++ conf.default.in	2009-03-25 00:59:55 +0000
@@ -42,7 +42,7 @@
 # 
 # The default settings are:
 # DEVSCRIPTS_CHECK_DIRNAME_LEVEL=1
-# DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.*)?'
+# DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.+)?'
 
 ##### annotate-output
 # 

=== modified file 'debian/changelog'
--- debian/changelog	2009-03-17 22:09:58 +0000
+++ debian/changelog	2009-03-25 01:18:37 +0000
@@ -1,7 +1,13 @@
 devscripts (2.10.48) UNRELEASED; urgency=low
 
+  [ Adam D. Barratt ]
   * Update Standards Version to 3.8.1 (no changes required)
 
+  [ Ben Finney ]
+  * Tighten default dirname regex to match a version only if it contains
+    at least one character: ‘PACKAGE(-.+)?’.
+    (Closes: Bug#521126)
+
  -- Adam D. Barratt <a...@adam-barratt.org.uk>  Wed, 04 Mar 2009 19:41:41 +0000
 
 devscripts (2.10.47) unstable; urgency=low

=== modified file 'debian/postinst'
--- debian/postinst	2009-03-04 13:24:44 +0000
+++ debian/postinst	2009-03-25 01:00:12 +0000
@@ -73,7 +73,7 @@
 # 
 # The default settings are:
 # DEVSCRIPTS_CHECK_DIRNAME_LEVEL=1
-# DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.*)?'
+# DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.+)?'
 EOF
 	    fi
 

=== modified file 'po4a/po/devscripts.pot'
--- po4a/po/devscripts.pot	2009-03-04 18:00:57 +0000
+++ po4a/po/devscripts.pot	2009-03-25 00:59:59 +0000
@@ -4142,7 +4142,7 @@
 "not, then it must match the full directory name.  If I<regex> contains the "
 "string \\'PACKAGE', this will be replaced by the source package name, as "
 "determined from the changelog.  The default value for the regex is: "
-"\\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and "
+"\\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and "
 "PACKAGE-version."
 msgstr ""
 

=== modified file 'po4a/po/fr.po'
--- po4a/po/fr.po	2009-03-04 18:00:57 +0000
+++ po4a/po/fr.po	2009-03-25 00:59:57 +0000
@@ -5198,7 +5198,7 @@
 "contains a '/', then it must match the full directory path.  If not, then it "
 "must match the full directory name.  If I<regex> contains the string "
 "\\'PACKAGE', this will be replaced by the source package name, as determined "
-"from the changelog.  The default value for the regex is: \\'PACKAGE(-.*)?', "
+"from the changelog.  The default value for the regex is: \\'PACKAGE(-.+)?', "
 "thus matching directory names such as PACKAGE and PACKAGE-version."
 msgstr ""
 "Le nom du répertoire est vérifié en testant si le nom du répertoire courant "
@@ -5209,7 +5209,7 @@
 "fin. Si elle contient un « / », alors elle doit correspondre au chemin "
 "complet. Si elle contient la chaîne « PACKAGE », cette chaîne sera remplacée "
 "par le nom du paquet source déterminé par le fichier changelog. La valeur "
-"par défaut de cette expression rationnelle est « PACKAGE(-.*)? », ce qui "
+"par défaut de cette expression rationnelle est « PACKAGE(-.+)? », ce qui "
 "correspond aux répertoires nommés PACKAGE ou PACKAGE-version."
 
 # type: TP

=== modified file 'scripts/debc.1'
--- scripts/debc.1	2008-03-15 18:43:38 +0000
+++ scripts/debc.1	2009-03-25 01:00:08 +0000
@@ -59,7 +59,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH OPTIONS
 .TP

=== modified file 'scripts/debchange.1'
--- scripts/debchange.1	2009-02-11 19:42:13 +0000
+++ scripts/debchange.1	2009-03-25 01:00:11 +0000
@@ -137,7 +137,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .PP
 The default changelog to be edited is \fIdebian/changelog\fR; however,

=== modified file 'scripts/debchange.pl'
--- scripts/debchange.pl	2009-02-21 13:36:00 +0000
+++ scripts/debchange.pl	2009-03-25 01:00:05 +0000
@@ -159,7 +159,7 @@
          What constitutes a matching directory name; REGEX is
          a Perl regular expression; the string \`PACKAGE\' will
          be replaced by the package name; see manpage for details
-         (default: 'PACKAGE(-.*)?')
+         (default: 'PACKAGE(-.+)?')
   --no-conf, --noconf
          Don\'t read devscripts config files; must be the first option given
   --release-heuristic log|changelog
@@ -192,7 +192,7 @@
 
 # Start by setting default values
 my $check_dirname_level = 1;
-my $check_dirname_regex = 'PACKAGE(-.*)?';
+my $check_dirname_regex = 'PACKAGE(-.+)?';
 my $opt_p = 0;
 my $opt_query = 1;
 my $opt_release_heuristic = 'log';
@@ -215,7 +215,7 @@
 		       'DEBCHANGE_PRESERVE' => 'no',
 		       'DEBCHANGE_QUERY_BTS' => 'yes',
 		       'DEVSCRIPTS_CHECK_DIRNAME_LEVEL' => 1,
-		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.*)?',
+		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.+)?',
 		       'DEBCHANGE_RELEASE_HEURISTIC' => 'log',
 		       'DEBCHANGE_MULTIMAINT' => 'yes',
 		       'DEBCHANGE_TZ' => $ENV{TZ}, # undef if TZ unset

=== modified file 'scripts/debclean.1'
--- scripts/debclean.1	2007-04-01 18:26:18 +0000
+++ scripts/debclean.1	2009-03-25 01:00:04 +0000
@@ -55,7 +55,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH OPTIONS
 .TP

=== modified file 'scripts/debclean.sh'
--- scripts/debclean.sh	2007-04-01 18:26:18 +0000
+++ scripts/debclean.sh	2009-03-25 01:00:06 +0000
@@ -24,7 +24,7 @@
                    What constitutes a matching directory name; REGEX is
                    a Perl regular expression; the string \`PACKAGE' will
                    be replaced by the package name; see manpage for details
-                   (default: 'PACKAGE(-.*)?')
+                   (default: 'PACKAGE(-.+)?')
 
     --no-conf, --noconf
                    Do not read devscripts config files;
@@ -52,7 +52,7 @@
 # Boilerplate: set config variables
 DEFAULT_DEBCLEAN_CLEANDEBS=no
 DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_LEVEL=1
-DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.*)?'
+DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.+)?'
 VARS="DEBCLEAN_CLEANDEBS DEVSCRIPTS_CHECK_DIRNAME_LEVEL DEVSCRIPTS_CHECK_DIRNAME_REGEX"
 
 

=== modified file 'scripts/debi.1'
--- scripts/debi.1	2008-11-24 18:51:47 +0000
+++ scripts/debi.1	2009-03-25 00:59:56 +0000
@@ -60,7 +60,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH OPTIONS
 .TP

=== modified file 'scripts/debi.pl'
--- scripts/debi.pl	2008-11-24 18:51:47 +0000
+++ scripts/debi.pl	2009-03-25 01:00:01 +0000
@@ -61,7 +61,7 @@
                       What constitutes a matching directory name; REGEX is
                       a Perl regular expression; the string \`PACKAGE\' will
                       be replaced by the package name; see manpage for details
-                      (default: 'PACKAGE(-.*)?')
+                      (default: 'PACKAGE(-.+)?')
     --help            Show this message
     --version         Show version and copyright information
 
@@ -93,7 +93,7 @@
                       What constitutes a matching directory name; REGEX is
                       a Perl regular expression; the string \`PACKAGE\' will
                       be replaced by the package name; see manpage for details
-                      (default: 'PACKAGE(-.*)?')
+                      (default: 'PACKAGE(-.+)?')
     --help            Show this message
     --version         Show version and copyright information
 
@@ -120,7 +120,7 @@
 my $debsdir = '..';
 my $debsdir_warning;
 my $check_dirname_level = 1;
-my $check_dirname_regex = 'PACKAGE(-.*)?';
+my $check_dirname_regex = 'PACKAGE(-.+)?';
 
 # Next, read configuration files and then command line
 # The next stuff is boilerplate
@@ -133,7 +133,7 @@
     my %config_vars = (
 		       'DEBRELEASE_DEBS_DIR' => '..',
 		       'DEVSCRIPTS_CHECK_DIRNAME_LEVEL' => 1,
-		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.*)?',
+		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.+)?',
 		       );
     my %config_default = %config_vars;
 

=== modified file 'scripts/debrelease.1'
--- scripts/debrelease.1	2007-02-23 09:31:10 +0000
+++ scripts/debrelease.1	2009-03-25 01:00:07 +0000
@@ -51,7 +51,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH OPTIONS
 .TP

=== modified file 'scripts/debrelease.sh'
--- scripts/debrelease.sh	2007-02-23 09:31:10 +0000
+++ scripts/debrelease.sh	2009-03-25 01:00:09 +0000
@@ -49,7 +49,7 @@
                       What constitutes a matching directory name; REGEX is
                       a Perl regular expression; the string \`PACKAGE' will
                       be replaced by the package name; see manpage for details
-                      (default: 'PACKAGE(-.*)?')
+                      (default: 'PACKAGE(-.+)?')
     --no-conf, --noconf
                       Don't read devscripts config files;
                       must be the first option given
@@ -84,7 +84,7 @@
 DEFAULT_DEBRELEASE_UPLOADER=dupload
 DEFAULT_DEBRELEASE_DEBS_DIR=..
 DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_LEVEL=1
-DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.*)?'
+DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.+)?'
 VARS="DEBRELEASE_UPLOADER DEBRELEASE_DEBS_DIR DEVSCRIPTS_CHECK_DIRNAME_LEVEL DEVSCRIPTS_CHECK_DIRNAME_REGEX"
 
 if [ "$1" = "--no-conf" -o "$1" = "--noconf" ]; then

=== modified file 'scripts/debuild.1'
--- scripts/debuild.1	2008-04-16 07:39:33 +0000
+++ scripts/debuild.1	2009-03-25 01:00:12 +0000
@@ -81,7 +81,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH ENVIRONMENT VARIABLES
 As environment variables can affect the building of a package, often

=== modified file 'scripts/debuild.pl'
--- scripts/debuild.pl	2009-03-02 18:38:14 +0000
+++ scripts/debuild.pl	2009-03-25 01:00:03 +0000
@@ -102,7 +102,7 @@
                 What constitutes a matching directory name; REGEX is
                 a Perl regular expression; the string \`PACKAGE\' will
                 be replaced by the package name; see manpage for details
-                (default: 'PACKAGE(-.*)?')
+                (default: 'PACKAGE(-.+)?')
 
         --help, -h    display this message
 
@@ -179,7 +179,7 @@
 my @lintian_opts=();
 my $checkbuilddep=1;
 my $check_dirname_level = 1;
-my $check_dirname_regex = 'PACKAGE(-.*)?';
+my $check_dirname_regex = 'PACKAGE(-.+)?';
 my $logging=0;
 my $tgz_check=1;
 my $prepend_path='';
@@ -254,7 +254,7 @@
 		       'DEBUILD_POST_DPKG_BUILDPACKAGE_HOOK' => '',
 		       'DEBUILD_SIGNING_USERNAME' => '',
 		       'DEVSCRIPTS_CHECK_DIRNAME_LEVEL' => 1,
-		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.*)?',
+		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.+)?',
 		       );
     my %config_default = %config_vars;
     my $dpkg_opts_var = 'DEBUILD_DPKG_BUILDPACKAGE_OPTS';

=== modified file 'scripts/nmudiff.sh'
--- scripts/nmudiff.sh	2009-03-04 13:24:44 +0000
+++ scripts/nmudiff.sh	2009-03-25 01:00:07 +0000
@@ -66,7 +66,7 @@
 VARS="NMUDIFF_DELAY NMUDIFF_MUTT NMUDIFF_NEWREPORT BTS_SENDMAIL_COMMAND"
 # Don't think it's worth including this stuff
 # DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_LEVEL=1
-# DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.*)?'
+# DEFAULT_DEVSCRIPTS_CHECK_DIRNAME_REGEX='PACKAGE(-.+)?'
 # VARS="BTS_SENDMAIL_COMMAND DEVSCRIPTS_CHECK_DIRNAME_LEVEL DEVSCRIPTS_CHECK_DIRNAME_REGEX"
 
 if [ "$1" = "--no-conf" -o "$1" = "--noconf" ]; then

=== modified file 'scripts/uscan.1'
--- scripts/uscan.1	2008-12-02 18:50:38 +0000
+++ scripts/uscan.1	2009-03-25 01:00:00 +0000
@@ -303,7 +303,7 @@
 match the full directory name.  If \fIregex\fR contains the string
 \'PACKAGE', this will be replaced by the source package name, as
 determined from the changelog.  The default value for the regex is:
-\'PACKAGE(-.*)?', thus matching directory names such as PACKAGE and
+\'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and
 PACKAGE-version.
 .SH EXAMPLE
 This script will perform a fully automatic upstream update.

=== modified file 'scripts/uscan.pl'
--- scripts/uscan.pl	2009-01-02 17:20:50 +0000
+++ scripts/uscan.pl	2009-03-25 01:00:02 +0000
@@ -105,7 +105,7 @@
                    What constitutes a matching directory name; REGEX is
                    a Perl regular expression; the string \`PACKAGE\' will
                    be replaced by the package name; see manpage for details
-                   (default: 'PACKAGE(-.*)?')
+                   (default: 'PACKAGE(-.+)?')
     --watchfile FILE
                    Specify the watchfile rather than using debian/watch;
                    no directory traversing will be done in this case
@@ -163,7 +163,7 @@
 my $symlink = 'symlink';
 my $verbose = 0;
 my $check_dirname_level = 1;
-my $check_dirname_regex = 'PACKAGE(-.*)?';
+my $check_dirname_regex = 'PACKAGE(-.+)?';
 my $dehs = 0;
 my %dehs_tags;
 my $dehs_end_output = 0;
@@ -188,7 +188,7 @@
 		       'USCAN_USER_AGENT' => '',
 		       'USCAN_REPACK' => 'no',
 		       'DEVSCRIPTS_CHECK_DIRNAME_LEVEL' => 1,
-		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.*)?',
+		       'DEVSCRIPTS_CHECK_DIRNAME_REGEX' => 'PACKAGE(-.+)?',
 		       );
     my %config_default = %config_vars;
 

Attachment: signature.asc
Description: Digital signature

Reply via email to