[devscripts] 04/05: debchange: consistently use \d+ over \d or [0-9] or [0-9]+ or whatnot

Mattia Rizzolo mattia at debian.org
Sat Oct 7 13:09:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository devscripts.

commit a2d556dbf085366eefab440ecb86eb88c32addb4
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Oct 7 15:08:23 2017 +0200

    debchange: consistently use \d+ over \d or [0-9] or [0-9]+ or whatnot
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 scripts/debchange.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index e6c979a..ef8b84b 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -1137,7 +1137,7 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
 		# If it's not already a backport make it so
 		# otherwise we can be safe if we behave like dch -i
 		$end .= "~bpo$latest_dist+1";
-	    } elsif ($opt_stable and not $start =~ /\+deb[0-9]u/) {
+	    } elsif ($opt_stable and not $start =~ /\+deb\d+u/) {
 		$end .= "+deb${latest_dist}u1";
 	    } elsif ($opt_l and not $start =~ /\Q$opt_l\E/) {
 		# If it's not already a local package make it so
@@ -1172,7 +1172,7 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
 		# based on the version of the previous backport
 		if ($opt_bpo) {
 		    my $previous_dist = $start;
-		    $previous_dist =~ s/^.*~bpo([0-9]+)\+$/$1/;
+		    $previous_dist =~ s/^.*~bpo(\d+)\+$/$1/;
 		    if (defined $previous_dist and defined
 			$bpo_dists{$previous_dist}) {
 			$bpo_dist = $bpo_dists{$previous_dist} . '-backports';
@@ -1186,7 +1186,7 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
 		# based on the version of the previous upload
 		if ($opt_stable) {
 		    my $previous_dist = $start;
-		    $previous_dist =~ s/^.*+deb([0-9]+)u$/$1/;
+		    $previous_dist =~ s/^.*+deb(\d+)u$/$1/;
 		    if (defined $previous_dist and defined
 			$stable_dists{$previous_dist}) {
 			$stable_dist = $stable_dists{$previous_dist};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list