]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- Invalid poldek source in poldek.conf bug fixed
[packages/rpm-build-tools.git] / builder.sh
index 7146a71e7f7272bd31140dde09ba6aeac60a1287..92230d88a86a24287eb52b31358d8a4c4ebedad5 100644 (file)
@@ -94,16 +94,18 @@ else
 fi
 
 #POLDEK_INDEX_DIR="/home/users/yoshi/rpm/RPMS/"
-POLDEK_INDEX_DIR="~/rpm/RPMS/"
+POLDEK_INDEX_DIR="/home/users/$USER/rpm/RPMS/"
 POLDEK_SOURCE="cvs"
 
 # Example grep cvs /etc/poldek.conf:
 # source = cvs /home/users/yoshi/rpm/RPMS/
-POLDEK_SOURCE_VALIDITY="`grep ${POLDEK_SOURCE} /etc/poldek.conf|grep -v ^#`"
-if [ "${POLDEK_SOURCE_VALIDITY}" == "" ]; then 
-       echo "Using improper source '${POLDEK_SOURCE}' in /etc/poldek.conf"
-       echo "Fix it and try to contiune"
-       exit 7
+if [ "$UPDATE_POLDEK_INDEXES" == "yes" ]; then
+       POLDEK_SOURCE_VALIDITY="`grep ${POLDEK_SOURCE} /etc/poldek.conf|grep -v ^#`"
+       if [ "${POLDEK_SOURCE_VALIDITY}" == "" ]; then 
+               echo "Using improper source '${POLDEK_SOURCE}' in /etc/poldek.conf"
+               echo "Fix it and try to contiune"
+               exit 7
+       fi
 fi
 
 if [ -f ~/etc/builderrc ]; then
@@ -868,15 +870,15 @@ if [ "$FETCH_BUILD_REQUIRES" == "yes" ]; then
                        fi
                        RESULT="${COND_STATE}-${COND_ARGV}"
                        case "$RESULT" in 
-                               with-wout|wout-with )
-                               GO=""
-                               ;;
-                               wout-wout|with-with )
-                               GO="yes"
-                               ;;
-                               *)
-                               echo "Action '$RESULT' was not defined for package '$package_item'"
-                               ;;
+                               "with-wout" | "wout-with" )
+                                       GO=""
+                                       ;;
+                               "wout-wout" | "with-with" )
+                                       GO="yes"
+                                       ;;
+                               * )
+                                       echo "Action '$RESULT' was not defined for package '$package_item'"
+                                       ;;
                        esac
 
                 fi
@@ -884,13 +886,14 @@ if [ "$FETCH_BUILD_REQUIRES" == "yes" ]; then
                 if [ "$GO" == "yes" ]; then
                         if [ "`rpm -q $package|sed -e "s/$package.*/$package/g"`" != "$package" ]; then
                                 echo "Package $package is not installed. Attempting to install..."
-                                poldek ${POLDEK_SOURCE} -i $package
+                                poldek -i $package
                                 case $? in
                                 1)
                                         echo "Unable to install $package package! Still trying to fetch rest..."
                                         NOT_INSTALLED_PACKAGES="$NOT_INSTALLED_PACKAGES $package"
                                         ;;
                                 0)
+                                       INSTALLED_PACKAGES="$package $INSTALLED_PACKAGES"
                                         ;;
                                 esac
                         else
@@ -995,6 +998,7 @@ while test $# -gt 0 ; do
            shift; CVSTAG="${1}"; shift ;;
         -R | --fetch-build-requires)
             FETCH_BUILD_REQUIRES="yes"
+           UPDATE_POLDEK_INDEXES="yes"
             NOT_INSTALLED_PACKAGES=
             shift ;;
        -Tvs | --tag-version-stable )
@@ -1097,7 +1101,7 @@ case "$COMMAND" in
            fi
            get_files "$SOURCES $PATCHES";
            build_package;
-           if [ $_ -eq 0 ] && [ "$UPDATE_POLDEK_INDEXES" == "yes" ]; then
+           if [ $? -eq 0 ] && [ "$UPDATE_POLDEK_INDEXES" == "yes" ]; then
                    poldek --sn ${POLDEK_SOURCE} --mkidx="${POLDEK_INDEX_DIR}/packages.dir.gz"
                    poldek --sn ${POLDEK_SOURCE} --up
            fi
This page took 0.064962 seconds and 4 git commands to generate.