diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2009-05-28 13:49:48 +0000 |
---|---|---|
committer | Ludwig Nussel <ludwig.nussel@suse.de> | 2009-05-28 13:49:48 +0000 |
commit | 72744c9274452c13f54e71c8f3a224bdcee3fda8 (patch) | |
tree | 1a3480bbf46abb82cf319735ab4d9126725fff53 | |
parent | 26a0aef94293ea116e7df60f174dc68e51cabc33 (diff) | |
download | build-72744c9274452c13f54e71c8f3a224bdcee3fda8.tar.gz build-72744c9274452c13f54e71c8f3a224bdcee3fda8.tar.bz2 build-72744c9274452c13f54e71c8f3a224bdcee3fda8.zip |
simplify .src.rpm handling a bit (bnc#500397)
-rwxr-xr-x | build | 24 | ||||
-rwxr-xr-x | unrpm | 2 |
2 files changed, 13 insertions, 13 deletions
@@ -887,26 +887,22 @@ for SPECFILE in "${SPECFILES[@]}" ; do } if test "$SPECFILE" != "${SPECFILE%.src.rpm}" ; then - echo processing src rpm `pwd`/$SPECFILE... - TOPDIR=`rpm --eval '%_topdir'` - rm -rf $BUILD_ROOT$TOPDIR - mkdir -p $BUILD_ROOT$TOPDIR/SOURCES $BUILD_ROOT$TOPDIR/SPECS - rpm -i --nodigest --nosignature --root $BUILD_ROOT $SPECFILE || { + echo processing src rpm $SRCDIR/$SPECFILE ... + MYSRCDIR=$BUILD_ROOT/.build-srcdir + rm -rf $MYSRCDIR + mkdir -p $MYSRCDIR + cd $MYSRCDIR || cleanup_and_exit 1 + $BUILD_DIR/unrpm -q $SRCDIR/$SPECFILE || { echo "could not install $SPECFILE." cleanup_and_exit 1 } - rm -rf $BUILD_ROOT/.build-srcdir - mkdir -p $BUILD_ROOT/.build-srcdir - mv $BUILD_ROOT$TOPDIR/SOURCES/* $BUILD_ROOT/.build-srcdir - mv $BUILD_ROOT$TOPDIR/SPECS/* $BUILD_ROOT/.build-srcdir - MYSRCDIR=$BUILD_ROOT/.build-srcdir - cd $MYSRCDIR || cleanup_and_exit 1 for SPECFILE in *.spec ; do : ; done else - echo processing specfile `pwd`/$SPECFILE... MYSRCDIR="$SRCDIR" fi + echo processing specfile $MYSRCDIR/$SPECFILE ... + ADDITIONAL_PACKS="" test -n "$BUILD_EXTRA_PACKS" && ADDITIONAL_PACKS="$ADDITIONAL_PACKS $BUILD_EXTRA_PACKS" test -n "$CREATE_BASELIBS" && ADDITIONAL_PACKS="$ADDITIONAL_PACKS build" @@ -955,6 +951,10 @@ for SPECFILE in "${SPECFILES[@]}" ; do cp -p "$MYSRCDIR"/* $BUILD_ROOT/.build-srcdir fi MYSRCDIR=$BUILD_ROOT/.build-srcdir + else + # cwd is at $BUILD_ROOT/.build-srcdir which we want to + # umount later so step aside + cd "$SRCDIR" fi Q="'\''" echo "SPECFILE='${SPECFILE//"'"/$Q}'" > $BUILD_ROOT/.build/build.data @@ -2,7 +2,7 @@ # function Usage () { - echo "Usage: $(basename $0) [-v] rpm-files..."; + echo "Usage: $(basename $0) [-vq] rpm-files..."; echo "Unpack rpm files in current directory."; exit 1 } |