diff mbox series

[1/2] UBUNTU: Fix dbgsym package renaming when we have a +signed version number

Message ID 20180421074128.18751-1-steve.langasek@canonical.com
State New
Headers show
Series [1/2] UBUNTU: Fix dbgsym package renaming when we have a +signed version number | expand

Commit Message

Steve Langasek April 21, 2018, 7:41 a.m. UTC
Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
---
 debian/rules | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Seth Forshee April 21, 2018, 9:40 p.m. UTC | #1
On Sat, Apr 21, 2018 at 12:41:27AM -0700, Steve Langasek wrote:
> Signed-off-by: Steve Langasek <steve.langasek@canonical.com>

Applied both to linux-signed for bionic, thanks!
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index 5b75e8b..495ab8c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,8 @@  DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
 # is the name of this package with -signed stripped.  The version is identical
 # to this package less any rebuild suffic (+signedN).
 src_package := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Source: | cut -d ' ' -f 2 | sed -e 's/-signed//')
-src_version = $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2 | sed -e 's/+signed[0-9]*.*//')
+src_fullversion = $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
+src_version = $(shell echo $(src_fullversion) | sed -e 's/+signed[0-9]*.*//')
 src_abi = $(shell echo "$(src_version)" | sed -ne 's/\([0-9]*\.[0-9]*\.[0-9]*\-[0-9]*\)\..*/\1/p')
 
 # We build our control file.  This has to be done before dh runs otherwise
@@ -87,7 +88,7 @@  override_dh_builddeb:
 	dh_builddeb
 	for pkg in $$(dh_listpackages); do \
 		case $$pkg in *dbgsym) ;; *) continue ;; esac; \
-		mv ../$${pkg}_$(src_version)_$(DEB_HOST_ARCH).deb \
-		   ../$${pkg}_$(src_version)_$(DEB_HOST_ARCH).ddeb; \
+		mv ../$${pkg}_$(src_fullversion)_$(DEB_HOST_ARCH).deb \
+		   ../$${pkg}_$(src_fullversion)_$(DEB_HOST_ARCH).ddeb; \
 		sed -i "/^$${pkg}_/s/\.deb /.ddeb /" debian/files; \
 	done