[SCM] Git repository for devscripts branch, master, updated. v2.11.7-28-g8d39b6f
Benjamin Drung
bdrung at debian.org
Mon May 28 23:22:49 UTC 2012
The following commit has been merged in the master branch:
commit 8d39b6f89d51cfd69ecd9c11453ac2cca7cffbaf
Author: Benjamin Drung <bdrung at debian.org>
Date: Tue May 29 01:20:29 2012 +0200
debchange: Append ubuntu1 to version when incrementing on Ubuntu, unless a -U/--upstream option is given.
diff --git a/debian/changelog b/debian/changelog
index 10a1f64..fa7445c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,8 @@ devscripts (2.11.8) UNRELEASED; urgency=low
has been supplied (--nmu, --qa, --bin-nmu, --bpo).
+ Adjust --security template for Ubuntu.
+ Add -R/--rebuild flag for Ubuntu's no-change rebuilds.
+ + Append ubuntu1 to version when incrementing on Ubuntu, unless a
+ -U/--upstream option is given.
[ Stefano Rivera ]
* devscripts.Logger Don't substitute arguments into logged strings unless
diff --git a/scripts/debchange.1 b/scripts/debchange.1
index aae6189..5245c16 100644
--- a/scripts/debchange.1
+++ b/scripts/debchange.1
@@ -236,6 +236,10 @@ upload, and add a \fBSecurity Team upload\fR changelog comment.
Increment the Debian release number for a team upload, and add a \fBTeam upload\fR
changelog comment.
.TP
+.BR \-\-upstream ", " \-U
+Don't append \fBdistro-name1\fR to the version on a derived
+distribution. Increment the Debian version.
+.TP
.B \-\-bpo
Increment the Debian release number for an upload to squeeze-backports,
and add a backport upload changelog comment.
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index d5aea3b..f3892f1 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -124,6 +124,9 @@ Options:
Increment the Debian release number for a Debian Security Team upload
--team
Increment the Debian release number for a team upload
+ -U, --upstream
+ Increment the Debian release number without any appended derivative
+ distribution name
--bpo
Increment the Debian release number for a Backports.org upload
to "squeeze-backports"
@@ -314,7 +317,7 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
# with older debchange versions.
my ($opt_help, $opt_version);
my ($opt_i, $opt_a, $opt_e, $opt_r, $opt_v, $opt_b, $opt_d, $opt_D, $opt_u, $opt_force_dist);
-my ($opt_n, $opt_bn, $opt_qa, $opt_R, $opt_s, $opt_team, $opt_bpo, $opt_l, $opt_c, $opt_m, $opt_M, $opt_create, $opt_package, @closes);
+my ($opt_n, $opt_bn, $opt_qa, $opt_R, $opt_s, $opt_team, $opt_U, $opt_bpo, $opt_l, $opt_c, $opt_m, $opt_M, $opt_create, $opt_package, @closes);
my ($opt_news);
my ($opt_level, $opt_regex, $opt_noconf, $opt_empty);
@@ -342,6 +345,7 @@ GetOptions("help|h" => \$opt_help,
"R|rebuild" => \$opt_R,
"s|security" => \$opt_s,
"team" => \$opt_team,
+ "U|upstream" => \$opt_U,
"bpo" => \$opt_bpo,
"l|local=s" => \$opt_l,
"query!" => \$opt_query,
@@ -1081,7 +1085,13 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
} elsif (!$opt_news) {
# Don't bump the version of a NEWS file in this case as we're
# using the version from the changelog
- $end++;
+ if (($opt_i or $opt_s) and $vendor eq 'Ubuntu' and
+ $start !~ /(build|ubuntu|~ppa)(\d+\.)*$/ and not $opt_U) {
+
+ $end .= "ubuntu1";
+ } else {
+ $end++;
+ }
# Attempt to set the distribution for a backport correctly
# based on the version of the previous backport
@@ -1097,7 +1107,7 @@ if (($opt_i || $opt_n || $opt_bn || $opt_qa || $opt_R || $opt_s || $opt_team ||
}
}
- if(! ($opt_s or $opt_n)) {
+ if(! ($opt_s or $opt_n or $vendor eq 'Ubuntu')) {
if ($start =~/(.*?)-(\d+)\.$/) {
# Drop NMU revision
my $upstream_version = $1;
diff --git a/test/test_debchange b/test/test_debchange
index e4fb90a..8355f40 100755
--- a/test/test_debchange
+++ b/test/test_debchange
@@ -47,6 +47,19 @@ testDebianIncrement() {
checkDebianVersion "-i" "12" "13"
}
+testUbuntuIncrement() {
+ checkUbuntuVersion "-i" "12" "12ubuntu1"
+ checkUbuntuVersion "-i" "3.4" "3.4ubuntu1"
+ checkUbuntuVersion "-i" "3.4.5" "3.4.5ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7" "5.6-7ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7.1" "5.6-7.1ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7.1.8" "5.6-7.1.8ubuntu1"
+ checkUbuntuVersion "-i" "2.13-14build5" "2.13-14build6"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3" "0.45-2ubuntu4"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3.1" "0.45-2ubuntu3.2"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3.1.0" "0.45-2ubuntu3.1.1"
+}
+
testUbuntuRebuild() {
checkUbuntuVersion "-R" "3.4" "3.4build1"
checkUbuntuVersion "-R" "2.0-4" "2.0-4build1"
--
Git repository for devscripts
More information about the devscripts-devel
mailing list