don't let the shell parse $RELEASE
authorLudwig Nussel <ludwig.nussel@suse.de>
Fri, 16 May 2008 07:37:07 +0000 (07:37 +0000)
committerLudwig Nussel <ludwig.nussel@suse.de>
Fri, 16 May 2008 07:37:07 +0000 (07:37 +0000)
build

diff --git a/build b/build
index 16f3510..a6308b5 100755 (executable)
--- a/build
+++ b/build
@@ -578,7 +578,7 @@ while test -n "$1"; do
         shift
       ;;
       *-release)
-        RELEASE="--release $ARG"
+        RELEASE="$ARG"
         shift
       ;;
       *-logfile)
@@ -1029,7 +1029,11 @@ for SPECFILE in "${SPECFILES[@]}" ; do
 
     if test "$SPECFILE" = "${SPECFILE%.dsc}" ; then
        # do buildrequires/release substitution
-       substitutedeps $RELEASE --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$BUILD_DIR/configs" $CHANGELOGARGS "$BUILD_ROOT$TOPDIR/SOURCES/$SPECFILE" "$BUILD_ROOT/.spec.new" || cleanup_and_exit 1
+       args=()
+       if test -n "$RELEASE"; then
+               args=(--release "$RELEASE")
+       fi
+       substitutedeps "${args[@]}" --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$BUILD_DIR/configs" $CHANGELOGARGS "$BUILD_ROOT$TOPDIR/SOURCES/$SPECFILE" "$BUILD_ROOT/.spec.new" || cleanup_and_exit 1
        # extract macros from configuration
        getmacros --dist "$BUILD_DIST" --archpath "$BUILD_ARCH" --configdir "$BUILD_DIR/configs" > $BUILD_ROOT/root/.rpmmacros
        if test -n "$BUILD_DEBUG" ; then