[debhelper-devel] [debhelper] 01/01: dh_builddeb: Let dpkg determine the udeb filename by default

Niels Thykier nthykier at moszumanska.debian.org
Sun Aug 30 13:39:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit b418f73de540dcc3c050c935dab90eed23fe610c
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Aug 30 15:38:49 2015 +0200

    dh_builddeb: Let dpkg determine the udeb filename by default
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 20 +-------------------
 debian/changelog           |  3 +++
 dh_builddeb                |  9 +++------
 doc/PROGRAMMING            |  2 --
 4 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 83ad659..07c1d89 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -16,7 +16,7 @@ use vars qw(@EXPORT %dh);
 	    &autoscript &filearray &filedoublearray
 	    &getpackages &basename &dirname &xargs %dh
 	    &compat &addsubstvar &delsubstvar &excludefile &package_arch
-	    &is_udeb &udeb_filename &debhelper_script_subst &escape_shell
+	    &is_udeb &debhelper_script_subst &escape_shell
 	    &inhibit_log &load_log &write_log &commit_override_log
 	    &dpkg_architecture_value &sourcepackage &make_symlink
 	    &is_make_jobserver_unavailable &clean_jobserver_makeflags
@@ -971,24 +971,6 @@ sub is_udeb {
 	return $package_types{$package} eq 'udeb';
 }
 
-sub _xdeb_filename {
-	my ($package, $ext, $actual_name) = @_;
-
-	my $filearch=package_arch($package);
-	isnative($package); # side effect
-	my $version=$dh{VERSION};
-	$version=~s/^[0-9]+://; # strip any epoch
-	$actual_name = $package if not defined($actual_name);
-	return "${actual_name}_${version}_${filearch}.${ext}";
-}
-
-# Generates the filename that is used for a udeb package.
-sub udeb_filename {
-	my ($package) = @_;
-
-	return _xdeb_filename($package, 'udeb');
-}
-
 # Handles #DEBHELPER# substitution in a script; also can generate a new
 # script from scratch if none exists but there is a .debhelper file for it.
 sub debhelper_script_subst {
diff --git a/debian/changelog b/debian/changelog
index 5c1c022..9fccc7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,9 @@ debhelper (9.20150811+unreleased) UNRELEASED; urgency=medium
   * d/control: Remove the homepage field.
   * dh: Make dh_strip_nondeterminism optional, so debhelper
     does not need to build-depend on it.
+  * dh_builddeb: Let dpkg figure out the filename of udebs
+    itself.  (Closes: #516721, #677353)
+  * Dh_Lib: Drop now unused udeb_filename subroutine.
 
   [ Paul Tagliamonte ]
   * dh_gencontrol: Put debug debs back in the "debug" section.
diff --git a/dh_builddeb b/dh_builddeb
index e36f0a3..cf35c07 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -139,12 +139,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 	}
 	else {
-		my $filename=$dh{FILENAME};
-		if (! $filename) {
-			$filename="/".udeb_filename($package);
-		}
-		doit("dpkg-deb", "-z1", "-Zxz", "-Sextreme",
-			@{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
+		my @dpkg_args = default_compressor_args(["-z1", "-Zxz", "-Sextreme"],
+												@{$dh{U_PARAMS}});
+		doit("dpkg-deb", @dpkg_args, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 	}
 	exit 0;
 }
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING
index 3b0bc13..945d192 100644
--- a/doc/PROGRAMMING
+++ b/doc/PROGRAMMING
@@ -260,8 +260,6 @@ excludefile($filename)
 is_udeb($package)
 	Returns true if the package is marked as a udeb in the control
 	file.
-udeb_filename($package)
-	Returns the filename of the udeb package.
 getpackages($type)
 	Returns a list of packages in the control file.
 	Pass "arch" or "indep" to specify arch-dependent or

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list