[SCM] Git repository for devscripts branch, master, updated. v2.11.9-2-g0f1cde4

Benjamin Drung bdrung at debian.org
Thu Jun 21 19:48:48 UTC 2012


The following commit has been merged in the master branch:
commit 0f1cde40d07d8f1eae1a2262b87c64717411d33f
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Jun 21 21:48:09 2012 +0200

    debchange: On Ubuntu always default to targeting the release that it's run from,
    not the current devel release, since its primary use on stable releases
    will be for preparing PPA uploads.
    
    LP: #1001068

diff --git a/debian/changelog b/debian/changelog
index 6a2edd9..6c0b421 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 devscripts (2.11.10) UNRELEASED; urgency=low
 
-  * debchange: Query name for stable-backport from distro-info.
+  * debchange:
+    - Query name for stable-backport from distro-info.
+    - On Ubuntu always default to targeting the release that it's run from,
+      not the current devel release, since its primary use on stable releases
+      will be for preparing PPA uploads. (LP: #1001068)
 
  -- Benjamin Drung <bdrung at debian.org>  Sun, 17 Jun 2012 23:33:41 +0200
 
diff --git a/debian/control b/debian/control
index b9b19d8..0c555a3 100644
--- a/debian/control
+++ b/debian/control
@@ -23,6 +23,7 @@ Build-Depends: debhelper (>= 8),
                libtimedate-perl,
                liburi-perl,
                libwww-perl,
+               lsb-release,
                perl,
                po4a (>= 0.40),
                pylint,
diff --git a/scripts/Makefile b/scripts/Makefile
index a09c706..99ed05e 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -35,6 +35,17 @@ $(VERSION_FILE):
 
 %: %.sh
 
+debchange: debchange.pl $(VERSION_FILE)
+	cp $< $@
+	sed -i "s/###VERSION###/$(VERSION)/" $@
+ifeq ($(shell dpkg-vendor --query Vendor),Ubuntu)
+# On Ubuntu always default to targeting the release that it's run from,
+# not the current devel release, since its primary use on stable releases
+# will be for preparing PPA uploads.
+	sed -i 's/get_ubuntu_devel_distro()/"$(shell lsb_release -cs)"/' $@
+endif
+	perl -I.. -c $@
+
 %.tmp: %.sh $(VERSION_FILE)
 	sed -e "s/###VERSION###/$(VERSION)/" $<  > $@
 	bash -n $@
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 86fdcc5..d44bfb5 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -105,6 +105,17 @@ sub get_ubuntu_distro_info {
     return $ubuntu_distro_info;
 }
 
+sub get_ubuntu_devel_distro {
+    my $ubu_info = get_ubuntu_distro_info();
+    if ($ubu_info == 0 or !$ubu_info->devel()) {
+	warn "$progname warning: Unable to determine the current Ubuntu "
+	     . "development release. Using UNRELEASED instead.";
+	return 'UNRELEASED';
+    } else {
+	return $ubu_info->devel();
+    }
+}
+
 sub usage () {
     print <<"EOF";
 Usage: $progname [options] [changelog entry]
@@ -641,14 +652,7 @@ if (! $opt_create || ($opt_create && $opt_news)) {
     if ($vendor eq 'Ubuntu') {
 	# In Ubuntu the development release regularly changes, don't just copy
 	# the previous name.
-	my $ubu_info = get_ubuntu_distro_info();
-	if ($ubu_info == 0 or !$ubu_info->devel()) {
-	    warn "$progname warning: Unable to determine the current Ubuntu "
-	         . "development release. Using UNRELEASED instead." if (!$opt_D);
-	    $DISTRIBUTION = 'UNRELEASED';
-	} else {
-	    $DISTRIBUTION = $ubu_info->devel();
-	}
+	$DISTRIBUTION=get_ubuntu_devel_distro();
     } else {
 	$DISTRIBUTION=$changelog{'Distribution'};
     }
@@ -1394,15 +1398,7 @@ if (($opt_r || $opt_a || $merge) && ! $opt_create) {
 		    if ($opt_D) {
 			$distribution = $opt_D;
 		    } else {
-			my $ubu_info = get_ubuntu_distro_info();
-			if ($ubu_info == 0 or !$ubu_info->devel()) {
-			    warn "$progname warning: Unable to determine the "
-			         . "current Ubuntu development release. "
-			         . "Using UNRELEASED instead.";
-			    $distribution = 'UNRELEASED';
-			} else {
-			    $distribution = $ubu_info->devel();
-			}
+			$distribution = get_ubuntu_devel_distro();
 		    }
 		} else {
 		    $distribution = $opt_D || $lastdist || "unstable";

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list