only set default repo if not using RPMLIST mode
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 21 Feb 2008 13:25:13 +0000 (13:25 +0000)
committerLudwig Nussel <ludwig.nussel@suse.de>
Thu, 21 Feb 2008 13:25:13 +0000 (13:25 +0000)
build

diff --git a/build b/build
index d00872d..dfd6285 100755 (executable)
--- a/build
+++ b/build
@@ -513,8 +513,17 @@ test -z "$LIST_STATE" -a "$UID" != 0 && {
     cleanup_and_exit 1
 }
 
-repos=("${repos[@]}" ${BUILD_RPMS//:/ /})
-: ${repos:=("--repository" "/media/dvd/suse")}
+if [ -z "$RPMLIST" ]; then
+    for i in ${BUILD_RPMS//:/ /}; do
+       repos[${#repos[@]}]='--repository';
+       repos[${#repos[@]}]="$i";
+    done
+    if [ -z "$repos" ]; then
+       repos=("--repository" "/media/dvd/suse")
+    fi
+else
+    repos=()
+fi
 
 if test -n "$KILL" ; then
     test -z "$SRCDIR" || usage