diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-11 15:24:15 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-02-02 16:44:15 -0800 |
commit | 3cad013fa57cfd32c7b1971ad7049b4c1a361daa (patch) | |
tree | 03ee7fd2ed62a1a628f7ed99f0ae49566013005c /scripts | |
parent | 962bc4dff6520651539fcc08a542cbf80c2b4c2d (diff) | |
download | librpm-tizen-3cad013fa57cfd32c7b1971ad7049b4c1a361daa.tar.gz librpm-tizen-3cad013fa57cfd32c7b1971ad7049b4c1a361daa.tar.bz2 librpm-tizen-3cad013fa57cfd32c7b1971ad7049b4c1a361daa.zip |
Split sources for debugging into separate -debugsource package
At the moment the -debuginfo package also include the sources where used
to build the binary. The patches moves them into a separate package -debugsource.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/find-debuginfo.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 10b83d4e0..778fd7aba 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -215,8 +215,8 @@ set -o pipefail strict_error=ERROR $strict || strict_error=WARNING -# Strip ELF binaries -find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 | sort -z | +# Strip ELF binaries (and no static libraries) +find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort -z | xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' | while read nlinks inum f; do case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in @@ -334,10 +334,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -d "${RPM_BUILD_ROOT}/usr/src" ]; then (cd "${RPM_BUILD_ROOT}/usr" test ! -d lib/debug || find lib/debug ! -type d - test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1 ) | sed 's,^,/usr/,' >> "$LISTFILE" fi +: > "$SOURCEFILE" +if [ -d "${RPM_BUILD_ROOT}/usr/src" ]; then + (cd "${RPM_BUILD_ROOT}/usr" + test ! -d src/debug || find src/debug -mindepth 1 -maxdepth 1 + ) | sed 's,^,/usr/,' >> "$SOURCEFILE" +fi + # Append to $1 only the lines from stdin not already in the file. append_uniq() { |