From 2dddf43909df1bd4e8033c8ad0d19f25b9bf0f2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 28 Dec 2005 19:11:45 +0000 Subject: [PATCH] - added -su,--source-urls - fixes to rpm-getdeps recursion Changed files: builder.sh -> 1.364 --- builder.sh | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/builder.sh b/builder.sh index 199b4fa..aa6553d 100644 --- a/builder.sh +++ b/builder.sh @@ -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 , --tag - add cvs tag 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" -- 2.44.0