[devscripts] 04/06: debchange: twak the "automatic set targe distribution" regex so it can matches also backports
Mattia Rizzolo
mattia at debian.org
Sat Nov 11 23:16:38 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 739ec89add377e2a2ac626b98714f3b2241f9c17
Author: Mattia Rizzolo <mattia at debian.org>
Date: Sat Nov 11 23:57:34 2017 +0100
debchange: twak the "automatic set targe distribution" regex so it can matches also backports
Looking at that regex now I doubt it ever matched anything before (even
before this little refactoring), as it used to check for 'bpo(\d+)\+$'
or 'deb(\d+)u$', i.e. a version ending with + or u. Also the logic
after that feels fishy to me. But let's keep this chunk of code around
until somebody gets the time to do a proper, real overhoul of
everything.
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
scripts/debchange.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index aea6025..75c9ac6 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -1172,13 +1172,13 @@ 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 || $opt_bpo || $opt_s) {
my $previous_dist = $start;
- $previous_dist =~ s/^.*[+~]deb(\d+)u$/$1/;
+ $previous_dist =~ s/^.*[+~](?:deb|bpo)(\d+)(?:u\+)\d+$/$1/;
if (defined $previous_dist and defined $dists{$previous_dist}) {
if ($opt_s) {
$guessed_dist = $dists{$previous_dist} . '-security';
} elsif ($opt_bpo) {
$guessed_dist = $dists{$previous_dist} . '-backports';
- } else {
+ } elsif ($opt_stable) {
$guessed_dist = $dists{$previous_dist};
}
} elsif ($opt_s) {
--
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