[SCM] Git repository for devscripts branch, master, updated. v2.12.0-1-gd543185

Benjamin Drung bdrung at debian.org
Fri Jul 6 20:56:03 UTC 2012


The following commit has been merged in the master branch:
commit d5431850de00a8867aca7d5808c55e74b3b6d122
Author: Benjamin Drung <bdrung at debian.org>
Date:   Fri Jul 6 22:55:55 2012 +0200

    debchange: Fix crash if libdistro-info-perl is not installed.
    
    Closes: #680213

diff --git a/debian/changelog b/debian/changelog
index 3c32ac7..692dc73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.12.1) UNRELEASED; urgency=low
+
+  * debchange: Fix crash if libdistro-info-perl is not installed.
+    (Closes: #680213)
+
+ -- Benjamin Drung <bdrung at debian.org>  Fri, 06 Jul 2012 22:54:12 +0200
+
 devscripts (2.12.0) unstable; urgency=low
 
   [ Benjamin Drung ]
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index d44bfb5..59d1697 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -484,10 +484,19 @@ 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') {
-	my $stable = get_debian_distro_info()->stable();
-	unless ($opt_D =~ /^(unstable|((old)?stable|testing)(-security)?|experimental|UNRELEASED|$stable-backports|((oldstable|testing)-)?proposed-updates)$/) {
-	    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";
-	    $warnings++ if not $opt_force_dist;
+	unless ($opt_D =~ /^(unstable|((old)?stable|testing)(-security)?|experimental|UNRELEASED|((oldstable|testing)-)?proposed-updates)$/) {
+	    my $deb_info = get_debian_distro_info();
+	    my $stable_backports = "";
+	    if ($deb_info == 0) {
+		warn "$progname warning: Unable to determine Debian's backport distributions.\n";
+	    } else {
+		$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";
+		$warnings++ if not $opt_force_dist;
+	    }
 	}
     } elsif ($vendor eq 'Ubuntu') {
 	if ($opt_D eq 'UNRELEASED') {

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list