Merge lp:~smcv/pkg-create-dbgsym/debug into lp:ubuntu/trusty/pkg-create-dbgsym

Proposed by Simon McVittie
Status: Merged
Merged at revision: 227
Proposed branch: lp:~smcv/pkg-create-dbgsym/debug
Merge into: lp:ubuntu/trusty/pkg-create-dbgsym
Diff against target: 93 lines (+28/-4)
2 files modified
dh_strip (+8/-1)
pkg_create_dbgsym (+20/-3)
To merge this branch: bzr merge lp:~smcv/pkg-create-dbgsym/debug
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+205805@code.launchpad.net

Description of the change

Debug-logging improvements

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks! I merged that with a few stylistic updates, like avoiding the "if [...]; then : else" syntax.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dh_strip'
2--- dh_strip 2011-05-19 19:09:20 +0000
3+++ dh_strip 2014-02-11 16:08:54 +0000
4@@ -53,8 +53,10 @@
5
6 if [ "$PKG_IGNORE_CURRENTLY_BUILDING" = 1 ]; then
7 addtofiles="-a"
8+ dbg "enabling due to PKG_IGNORE_CURRENTLY_BUILDING = 1"
9 elif grep -qs '^Build-Debug-Symbols: yes$' /CurrentlyBuilding; then
10 addtofiles="-a"
11+ dbg "enabling due to Build-Debug-Symbols: yes in /CurrentlyBuilding"
12 else
13 # If sbuild hasn't explicitly told us to build debug symbols, we will
14 # avoid doing so if this is a rebuild or PPA build.
15@@ -72,7 +74,12 @@
16 # upload ddebs unless we really know that Soyuz can handle them, so
17 # we tell pkg_create_dbgsym to avoid adding them to the changes
18 # file.
19- [ -f /CurrentlyBuilding ] || addtofiles="-a"
20+ if [ -f /CurrentlyBuilding ]; then
21+ dbg "disabling because /CurrentlyBuilding doesn't enable it"
22+ else
23+ addtofiles="-a"
24+ dbg "enabling because /CurrentlyBuilding doesn't exist"
25+ fi
26 fi
27
28 if [ -n "$NO_PKG_MANGLE" ]; then
29
30=== modified file 'pkg_create_dbgsym'
31--- pkg_create_dbgsym 2013-09-02 08:34:39 +0000
32+++ pkg_create_dbgsym 2014-02-11 16:08:54 +0000
33@@ -35,6 +35,10 @@
34 OBJCOPY=${DEB_HOST_GNU_TYPE}-objcopy
35 fi
36
37+dbg() {
38+ echo "$0: $*"
39+}
40+
41 for p; do
42 case $p in
43 -X*)
44@@ -71,10 +75,20 @@
45 # python-*-dbg, these are quite different
46 dbgdepends=
47 for p in `grep '^Package:.*-dbg' debian/control | cut -f 2 -d\ `; do
48- [ "$p" = "${p#python}" ] || continue
49+ if [ "$p" = "${p#python}" ]; then
50+ :
51+ else
52+ dbg "ignoring python* package: $p"
53+ continue
54+ fi
55 # heuristic to avoid considering transitional -dbg packages which are going
56 # to be empty
57- [ -z "`perl -n000 -e 'print if m/Package: $p/ && m/transitional/' debian/control`" ] || continue
58+ if [ -z "`perl -n000 -e 'print if m/Package: $p/ && m/transitional/' debian/control`" ]; then
59+ :
60+ else
61+ dbg "ignoring transitional package $p"
62+ continue
63+ fi
64 [ -z "$dbgdepends" ] || dbgdepends="$dbgdepends, "
65 dbgdepends="$dbgdepends$p (= \1)"
66 done
67@@ -139,7 +153,7 @@
68 }
69 done
70 if [ -z "$any_unstripped" ]; then
71- echo "$pkgname is already stripped, ignoring" >&2
72+ echo "$pkgname has no unstripped objects, ignoring" >&2
73 rm -rf $dp
74 exit 0
75 fi
76@@ -147,6 +161,7 @@
77 cd $origdir
78
79 if [ ! -d "$dp" -o -z "`find $dp -type f`" ] && [ -z "$dbgdepends" ]; then
80+ dbg "nothing in $dp and no dbgdepends, ignoring"
81 rm -rf $dp
82 exit 0
83 fi
84@@ -185,8 +200,10 @@
85 ddeb="${ddebname}_${ddebversion}_${ddebarch}.ddeb"
86
87 # build .ddeb and add it to debian/files
88+dbg "building ddeb package"
89 NO_PKG_MANGLE=1 dpkg-deb -Zxz --build $dp ../$ddeb
90 if [ "$add_to_files" = "1" ]; then
91+ dbg "dpkg-distaddfile $ddeb $ddebsection $ddebpriority"
92 dpkg-distaddfile "$ddeb" "$ddebsection" "$ddebpriority"
93 fi
94

Subscribers

People subscribed via source and target branches