]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- added -su,--source-urls
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Dec 2005 19:11:45 +0000 (19:11 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- fixes to rpm-getdeps recursion

Changed files:
    builder.sh -> 1.364

builder.sh

index 199b4fafb04b4cdadbde10368be146b552ffbff8..aa6553d1ea4b909053845dbd2558828204e2942d 100644 (file)
@@ -247,6 +247,8 @@ Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
 -sp, --source-paths - list sources - filenames with full local paths (intended for
                       offline operations; does not work when Icon field is present
                                                         but icon file is absent),
+-su, --source-urls  - list urls - urls to sources and patches
+                      intended for copying urls with spec with lots of macros in urls
 -T <cvstag> , --tag <cvstag>
                     - add cvs tag <cvstag> for files,
 -Tvs, --tag-version-stable
@@ -288,14 +290,14 @@ Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
 
 update_shell_title() {
        [ -t 1 ] || return
-       echo "$*"
+       echo >&2 "$*"
        local msg="builder[$SPECFILE] $*"
        case "$TERM" in
                cygwin|xterm*)
-               echo -ne "\033]1;$msg\007\033]2;$msg\007"
+               echo >&2 -ne "\033]1;$msg\007\033]2;$msg\007"
        ;;
                screen*)
-               echo -ne "\033]0;$msg\007"
+               echo >&2 -ne "\033]0;$msg\007"
        ;;
        esac
 }
@@ -1295,8 +1297,8 @@ fetch_build_requires()
        if [ "${FETCH_BUILD_REQUIRES}" = "yes" ]; then
                update_shell_title "fetch_build_requires"
                if [ "$FETCH_BUILD_REQUIRES_RPMGETDEPS" = "yes" ]; then
-                       CONF=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\-/ { print $3 } ' | _rpm_cnfl_check | xargs)
-                       DEPS=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\+/ { print $3 } ' | _rpm_prov_check | xargs)
+                       local CONF=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\-/ { print $3 } ' | _rpm_cnfl_check | xargs)
+                       local DEPS=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\+/ { print $3 } ' | _rpm_prov_check | xargs)
 
                        update_shell_title "fetch_build_requires: update indexes"
                        if [ -n "$CONF" ] || [ -n "$DEPS" ]; then
@@ -1307,20 +1309,25 @@ fetch_build_requires()
                                echo "Trying to uninstall conflicting packages ($CONF):"
                                $SU_SUDO /usr/bin/poldek --noask --nofollow -ev $CONF
                        fi
-                       if [ -n "$DEPS" ]; then
+
+                  while [ "$DEPS" ]; do
                                update_shell_title "fetch_build_requires: install deps ($DEPS)"
                                echo "Trying to install dependencies ($DEPS):"
                                local log=.${SPECFILE}_poldek.log
                                $SU_SUDO /usr/bin/poldek --caplookup -uGq $DEPS | tee $log
                                failed=$(awk -F: '/^error:/{print $2}' $log)
                                rm -f $log
+                               local ok
                                if [ -n "$failed" ]; then
                                         for package in $failed; do
                                                  # FIXME: sanitise, deps could be not .spec files
-                                                 spawn_sub_builder -bb $package
+                                                 spawn_sub_builder -bb $package && ok="$ok $package"
                                         done
+                                        DEPS="$ok"
+                               else
+                                        DEPS=""
                                fi
-                       fi
+                  done
                        return
                fi
 
@@ -1601,6 +1608,9 @@ do
                -sp | --sources-paths)
                        COMMAND="list-sources-local-paths"
                        shift ;;
+               -su | --sources-urls)
+                       COMMAND="list-sources-urls"
+                       shift ;;
                -Tvs | --tag-version-stable )
                        COMMAND="tag";
                        TAG="STABLE"
@@ -1824,6 +1834,17 @@ case "$COMMAND" in
                         echo $SAP | awk '{gsub(/.*\//,"") ; print}'
                done
                ;;
+       "list-sources-urls" )
+               init_builder
+               NOCVSSPEC="yes"
+               DONT_PRINT_REVISION="yes"
+               get_spec
+               parse_spec
+               SAPS="$SOURCES $PATCHES"
+               for SAP in $SAPS ; do
+                        echo $SAP
+               done
+               ;;
        "list-sources-local-paths" )
                init_builder
                NOCVSSPEC="yes"
This page took 0.040625 seconds and 4 git commands to generate.