From 4f8398fde446853e3f2cb245c3e85a26b103901d Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 5 Jul 2012 15:26:13 +0200 Subject: [PATCH] - add back one layer of indirection: only create debug packages if rpmbuild is called with --define _build_create_debug 1 Otherwise mkbaselibs creates debug packages, especially a broken debugsource package. --- build | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/build b/build index 8b6cb96..d33582f 100755 --- a/build +++ b/build @@ -2009,9 +2009,9 @@ for SPECFILE in "${SPECFILES[@]}" ; do getmacros --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$CONFIG_DIR" > $BUILD_ROOT/root/.rpmmacros if test -n "$BUILD_DEBUG" ; then echo ' -%prep %{?!__debug_package:%?_suse_insert_debug_package}%%prep -%package %{?!__debug_package:%?_suse_insert_debug_package}%%package -%_suse_insert_debug_package \ +%prep %{?!__debug_package:%{?_build_create_debug:%?_build_insert_debug_package}}%%prep +%package %{?!__debug_package:%{?_build_create_debug:%?_build_insert_debug_package}}%%package +%_build_insert_debug_package \ %global __debug_package 1 \ %undefine _enable_debug_packages \ %debug_package @@ -2141,20 +2141,24 @@ for SPECFILE in "${SPECFILES[@]}" ; do # XXX: move _srcdefattr to macro file? rpmbopts=("$BUILD_RPM_BUILD_STAGE" "--define" "_srcdefattr (-,root,root)") - if [ "$rpmbuild" == "rpmbuild" ]; then + if test "$rpmbuild" == "rpmbuild" ; then # use only --nosignature for rpm v4 - rpmbopts[${#rpmbopts[@]}]="--nosignature" + rpmbopts[${#rpmbopts[@]}]="--nosignature" fi - if [ -n "$ABUILD_TARGET" ]; then - rpmbopts[${#rpmbopts[@]}]="--target=$ABUILD_TARGET" + if test -n "$ABUILD_TARGET" ; then + rpmbopts[${#rpmbopts[@]}]="--target=$ABUILD_TARGET" fi - if [ -n "$DISTURL" ]; then - rpmbopts[${#rpmbopts[@]}]='--define' - rpmbopts[${#rpmbopts[@]}]="disturl $DISTURL" + if test -n "$BUILD_DEBUG" ; then + rpmbopts[${#rpmbopts[@]}]='--define' + rpmbopts[${#rpmbopts[@]}]="_build_create_debug 1" + fi + if test -n "$DISTURL" ; then + rpmbopts[${#rpmbopts[@]}]='--define' + rpmbopts[${#rpmbopts[@]}]="disturl $DISTURL" fi - if [ -n "$RSYNCDONE" ] ; then - rpmbopts[${#rpmbopts[@]}]='--define' - rpmbopts[${#rpmbopts[@]}]="RSYNCDONE 1" + if test -n "$RSYNCDONE" ; then + rpmbopts[${#rpmbopts[@]}]='--define' + rpmbopts[${#rpmbopts[@]}]="RSYNCDONE 1" fi # su involves a shell which would require even more -- 2.7.4