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
=== modified file 'dh_strip'
--- dh_strip 2011-05-19 19:09:20 +0000
+++ dh_strip 2014-02-11 16:08:54 +0000
@@ -53,8 +53,10 @@
5353
54if [ "$PKG_IGNORE_CURRENTLY_BUILDING" = 1 ]; then54if [ "$PKG_IGNORE_CURRENTLY_BUILDING" = 1 ]; then
55 addtofiles="-a"55 addtofiles="-a"
56 dbg "enabling due to PKG_IGNORE_CURRENTLY_BUILDING = 1"
56elif grep -qs '^Build-Debug-Symbols: yes$' /CurrentlyBuilding; then57elif grep -qs '^Build-Debug-Symbols: yes$' /CurrentlyBuilding; then
57 addtofiles="-a"58 addtofiles="-a"
59 dbg "enabling due to Build-Debug-Symbols: yes in /CurrentlyBuilding"
58else60else
59 # If sbuild hasn't explicitly told us to build debug symbols, we will61 # If sbuild hasn't explicitly told us to build debug symbols, we will
60 # avoid doing so if this is a rebuild or PPA build.62 # avoid doing so if this is a rebuild or PPA build.
@@ -72,7 +74,12 @@
72 # upload ddebs unless we really know that Soyuz can handle them, so74 # upload ddebs unless we really know that Soyuz can handle them, so
73 # we tell pkg_create_dbgsym to avoid adding them to the changes75 # we tell pkg_create_dbgsym to avoid adding them to the changes
74 # file.76 # file.
75 [ -f /CurrentlyBuilding ] || addtofiles="-a"77 if [ -f /CurrentlyBuilding ]; then
78 dbg "disabling because /CurrentlyBuilding doesn't enable it"
79 else
80 addtofiles="-a"
81 dbg "enabling because /CurrentlyBuilding doesn't exist"
82 fi
76fi83fi
7784
78if [ -n "$NO_PKG_MANGLE" ]; then85if [ -n "$NO_PKG_MANGLE" ]; then
7986
=== modified file 'pkg_create_dbgsym'
--- pkg_create_dbgsym 2013-09-02 08:34:39 +0000
+++ pkg_create_dbgsym 2014-02-11 16:08:54 +0000
@@ -35,6 +35,10 @@
35 OBJCOPY=${DEB_HOST_GNU_TYPE}-objcopy35 OBJCOPY=${DEB_HOST_GNU_TYPE}-objcopy
36fi36fi
3737
38dbg() {
39 echo "$0: $*"
40}
41
38for p; do42for p; do
39 case $p in43 case $p in
40 -X*)44 -X*)
@@ -71,10 +75,20 @@
71# python-*-dbg, these are quite different75# python-*-dbg, these are quite different
72dbgdepends=76dbgdepends=
73for p in `grep '^Package:.*-dbg' debian/control | cut -f 2 -d\ `; do77for p in `grep '^Package:.*-dbg' debian/control | cut -f 2 -d\ `; do
74 [ "$p" = "${p#python}" ] || continue78 if [ "$p" = "${p#python}" ]; then
79 :
80 else
81 dbg "ignoring python* package: $p"
82 continue
83 fi
75 # heuristic to avoid considering transitional -dbg packages which are going84 # heuristic to avoid considering transitional -dbg packages which are going
76 # to be empty85 # to be empty
77 [ -z "`perl -n000 -e 'print if m/Package: $p/ && m/transitional/' debian/control`" ] || continue86 if [ -z "`perl -n000 -e 'print if m/Package: $p/ && m/transitional/' debian/control`" ]; then
87 :
88 else
89 dbg "ignoring transitional package $p"
90 continue
91 fi
78 [ -z "$dbgdepends" ] || dbgdepends="$dbgdepends, "92 [ -z "$dbgdepends" ] || dbgdepends="$dbgdepends, "
79 dbgdepends="$dbgdepends$p (= \1)"93 dbgdepends="$dbgdepends$p (= \1)"
80done94done
@@ -139,7 +153,7 @@
139 }153 }
140done154done
141if [ -z "$any_unstripped" ]; then155if [ -z "$any_unstripped" ]; then
142 echo "$pkgname is already stripped, ignoring" >&2156 echo "$pkgname has no unstripped objects, ignoring" >&2
143 rm -rf $dp157 rm -rf $dp
144 exit 0158 exit 0
145fi159fi
@@ -147,6 +161,7 @@
147cd $origdir161cd $origdir
148162
149if [ ! -d "$dp" -o -z "`find $dp -type f`" ] && [ -z "$dbgdepends" ]; then163if [ ! -d "$dp" -o -z "`find $dp -type f`" ] && [ -z "$dbgdepends" ]; then
164 dbg "nothing in $dp and no dbgdepends, ignoring"
150 rm -rf $dp165 rm -rf $dp
151 exit 0166 exit 0
152fi167fi
@@ -185,8 +200,10 @@
185ddeb="${ddebname}_${ddebversion}_${ddebarch}.ddeb"200ddeb="${ddebname}_${ddebversion}_${ddebarch}.ddeb"
186201
187# build .ddeb and add it to debian/files202# build .ddeb and add it to debian/files
203dbg "building ddeb package"
188NO_PKG_MANGLE=1 dpkg-deb -Zxz --build $dp ../$ddeb204NO_PKG_MANGLE=1 dpkg-deb -Zxz --build $dp ../$ddeb
189if [ "$add_to_files" = "1" ]; then205if [ "$add_to_files" = "1" ]; then
206 dbg "dpkg-distaddfile $ddeb $ddebsection $ddebpriority"
190 dpkg-distaddfile "$ddeb" "$ddebsection" "$ddebpriority"207 dpkg-distaddfile "$ddeb" "$ddebsection" "$ddebpriority"
191fi208fi
192209

Subscribers

People subscribed via source and target branches