From bcdefa1274ea210e7061f5d46cc7263200a360abd01206baa79ae26414bcd6a5 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 30 Jul 2009 11:02:08 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/post-build-checks?expand=0&rev=22 --- check-debuginfo.diff | 46 ++++++++++++++++++++++++++++++++++++--- post-build-checks.changes | 5 +++++ post-build-checks.spec | 2 +- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/check-debuginfo.diff b/check-debuginfo.diff index 120ccfc..0d62e5d 100644 --- a/check-debuginfo.diff +++ b/check-debuginfo.diff @@ -1,6 +1,8 @@ ---- checks/01-check-debuginfo.orig 2009-07-27 16:52:05.000000000 +0200 -+++ checks/01-check-debuginfo 2009-07-27 16:52:09.000000000 +0200 -@@ -5,7 +5,7 @@ +Index: checks/01-check-debuginfo +=================================================================== +--- checks/01-check-debuginfo.orig 2008-07-14 13:47:43.000000000 +0200 ++++ checks/01-check-debuginfo 2009-07-30 10:11:30.000000000 +0200 +@@ -5,7 +5,7 @@ echo "... testing for empty debuginfo pa fast= test -x /usr/lib/rpm/rpmi && fast="--nodigest --nosignature" @@ -9,3 +11,41 @@ test -z "$RPMS" && exit 0 for rpm in $RPMS ; do HAS_DEBUG= +@@ -16,34 +16,11 @@ for rpm in $RPMS ; do + /usr/src/debug/*) HAS_SRC=true ;; + esac + done +- if test -z "$HAS_DEBUG" ; then ++ if test -z "$HAS_DEBUG" -a -z "$HAS_SRC"; then + echo '!' +- echo "! ${rpm##*/}: no debug information, deleting package" +- echo '!' +- rm -f "$rpm" "${rpm/-debuginfo-/-debugsource-}" +- elif test -z "$HAS_SRC" ; then +- rpmsource=${rpm/-debuginfo-/-debugsource-} +- if test -s "${rpmsource}" ; then +-# for l in "$(rpm -qpl $fast ${rpmsource})" ; do +-# case "$l" in +-# /usr/src/debug/*) HAS_SRC=true ;; +-# "(contains no files)") HAS_SRC=""; break ;; +-# esac +-# done +- rpm -qpl $fast "${rpmsource}" | egrep -q "^/usr/src/debug/" && HAS_SRC=true +- if test -n "$HAS_SRC" ; then +- continue +- fi +- echo '!' +- echo "! ${rpmsource##*/}: no debug sources, deleting package" +- echo "! ${rpm##*/}: WARNING: this probably means the debug information is invalid" +- echo '!' +- rm -f "${rpmsource}" +- continue +- fi +- echo '!' +- echo "! ${rpm##*/}: WARNING: no sources in debuginfo package" ++ echo "! $rpm: empty debuginfo/debugsource package, deleting" + echo '!' ++ rm -f "$rpm" + fi + done + exit 0 diff --git a/post-build-checks.changes b/post-build-checks.changes index 4fc3a08..02dfa72 100644 --- a/post-build-checks.changes +++ b/post-build-checks.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 30 10:11:52 CEST 2009 - rguenther@suse.de + +- simplify and fix empty debuginfo/source deletion + ------------------------------------------------------------------- Mon Jul 27 16:53:13 CEST 2009 - rguenther@suse.de diff --git a/post-build-checks.spec b/post-build-checks.spec index 006f983..4777205 100644 --- a/post-build-checks.spec +++ b/post-build-checks.spec @@ -24,7 +24,7 @@ Group: Development/Tools/Building AutoReqProv: on Summary: post checks for build after rpms have been created Version: 1.0 -Release: 63 +Release: 64 PreReq: aaa_base permissions sed Source0: %{name}-%{version}.tar.bz2 Source1: suse-buildsystem.sh