[SCM] Git repository for devscripts branch, master, updated. v2.12.0-3-g5a4c6cf

Benjamin Drung bdrung at debian.org
Fri Jul 6 22:33:34 UTC 2012


The following commit has been merged in the master branch:
commit 5a4c6cf51c2e0fdf8bc1ba00df2e4c6be7b16ffe
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sat Jul 7 00:33:25 2012 +0200

    debchange: Recognize stable-proposed-updates as Debian distribution.
    
    Closes: #677613

diff --git a/debian/changelog b/debian/changelog
index 692dc73..7334044 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
 devscripts (2.12.1) UNRELEASED; urgency=low
 
-  * debchange: Fix crash if libdistro-info-perl is not installed.
-    (Closes: #680213)
+  * debchange:
+    - Fix crash if libdistro-info-perl is not installed. (Closes: #680213)
+    - Recognize stable-proposed-updates as Debian distribution (Closes: #677613)
 
  -- Benjamin Drung <bdrung at debian.org>  Fri, 06 Jul 2012 22:54:12 +0200
 
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index e069e2e..a5c3936 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -484,7 +484,7 @@ if ($vendor eq 'Ubuntu' and ($opt_n or $opt_bn or $opt_qa or $opt_bpo)) {
 # Check the distro name given.
 if (defined $opt_D) {
     if ($vendor eq 'Debian') {
-	unless ($opt_D =~ /^(unstable|((old)?stable|testing)(-security)?|experimental|UNRELEASED|((oldstable|testing)-)?proposed-updates)$/) {
+	unless ($opt_D =~ /^(experimental|unstable|UNRELEASED|((old)?stable|testing)(-proposed-updates|-security)?|proposed-updates)$/) {
 	    my $deb_info = get_debian_distro_info();
 	    my $stable_backports = "";
 	    if ($deb_info == 0) {
@@ -493,8 +493,11 @@ if (defined $opt_D) {
 		$stable_backports = $deb_info->stable() . "-backports";
 	    }
 	    if ($deb_info == 0 || not $opt_D eq $stable_backports) {
-		$stable_backports = " " . $stable_backports . "," if not $stable_backports eq "";
-		warn "$progname warning: Recognised distributions are: unstable, testing, stable,\noldstable, experimental, UNRELEASED,$stable_backports\n{oldstable-,testing-,}proposed-updates and {testing,stable,oldstable}-security.\nUsing your request anyway.\n";
+		$stable_backports = ", " . $stable_backports if not $stable_backports eq "";
+		warn "$progname warning: Recognised distributions are: unstable, testing, stable,\n"
+		     . "oldstable, experimental, {testing-,stable-,oldstable-,}proposed-updates,\n"
+		     . "{testing,stable,oldstable}-security$stable_backports and UNRELEASED.\n"
+		     . "Using your request anyway.\n";
 		$warnings++ if not $opt_force_dist;
 	    }
 	}
diff --git a/test/test_debchange b/test/test_debchange
index 037a080..a452a78 100755
--- a/test/test_debchange
+++ b/test/test_debchange
@@ -34,6 +34,10 @@ checkVersion() {
     assertEquals "\"dch $param\" from version $start_version" "$expected_version" "$version"
 }
 
+checkDebianDistribution() {
+    checkVersion "--vendor Debian -D unstable" "--vendor Debian -i -D $1" "1.0-1" "1.0-2"
+}
+
 checkDebianVersion() {
     checkVersion "--vendor Debian -D unstable" "--vendor Debian $1" "$2" "$3"
 }
@@ -42,6 +46,21 @@ checkUbuntuVersion() {
     checkVersion "--vendor Debian -D unstable" "--vendor Ubuntu $1" "$2" "$3"
 }
 
+testDebianDistributions() {
+    checkDebianDistribution "experimental"
+    checkDebianDistribution "oldstable"
+    checkDebianDistribution "oldstable-proposed-updates"
+    checkDebianDistribution "oldstable-security"
+    checkDebianDistribution "proposed-updates"
+    checkDebianDistribution "stable"
+    checkDebianDistribution "stable-proposed-updates"
+    checkDebianDistribution "stable-security"
+    checkDebianDistribution "testing"
+    checkDebianDistribution "testing-proposed-updates"
+    checkDebianDistribution "testing-security"
+    checkDebianDistribution "UNRELEASED"
+}
+
 testDebianIncrement() {
     checkDebianVersion "-i" "1.0-1" "1.0-2"
     checkDebianVersion "-i" "12" "13"

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list