]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- detect and use rpm-getdeps binary
[packages/rpm-build-tools.git] / builder.sh
index a40ab50a0bade14e11532e96020cdad9fa6e300b..eac5ba78f76db42935bbd157eec69e58d7c47464 100644 (file)
@@ -91,6 +91,12 @@ DEF_NICE_LEVEL=19
 
 FAIL_IF_NO_SOURCES="yes"
 
+if [ -x /usr/bin/rpm-getdeps ]; then
+        FETCH_BUILD_REQUIRES_RPMGETDEPS="yes"
+else
+        FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
+fi
+
 # Here we load saved user environment used to
 # predefine options set above, or passed to builder
 # in command line.
@@ -1156,7 +1162,7 @@ fetch_build_requires()
                        CONF=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\-/ { print "@" $3 } ' | xargs)
                        DEPS=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\+/ { print "@" $3 } ' | xargs)
                        if [ -n "$CONF" -o -n "$DEPS" ]; then
-                               $SU_SUDO /usr/bin/poldek --update; $SU_SUDO /usr/bin/poldek --upa
+                               $SU_SUDO /usr/bin/poldek --update || $SU_SUDO /usr/bin/poldek --upa
                        fi
                        if [ -n "$CONF" ]; then
                                echo "Trying to uninstall conflicting packages ($CONF):"
This page took 0.028684 seconds and 4 git commands to generate.