SOURCES: builder - 0.16
glen
glen at pld-linux.org
Mon May 22 22:51:31 CEST 2006
Author: glen Date: Mon May 22 20:51:31 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- 0.16
---- Files affected:
SOURCES:
builder (1.13 -> 1.14)
---- Diffs:
================================================================
Index: SOURCES/builder
diff -u SOURCES/builder:1.13 SOURCES/builder:1.14
--- SOURCES/builder:1.13 Sun Feb 5 18:20:19 2006
+++ SOURCES/builder Mon May 22 22:51:26 2006
@@ -22,7 +22,7 @@
VERSION="\
Build package utility from PLD Linux CVS repository
-v0.14 (C) 1999-2006 Free Penguins".
+v0.16 (C) 1999-2006 Free Penguins".
PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
COMMAND="build"
@@ -37,6 +37,7 @@
NOCVS=""
NOCVSSPEC=""
NODIST=""
+NOINIT=""
UPDATE=""
UPDATE5=""
ADD5=""
@@ -61,6 +62,7 @@
CHMOD="no"
CHMOD_MODE="0444"
RPMOPTS=""
+RPMBUILDOPTS=""
BCOND=""
GROUP_BCONDS="no"
CVSIGNORE_DF="no"
@@ -83,6 +85,7 @@
ATTICDISTFILES_SERVER="://attic-distfiles.pld-linux.org"
DEF_NICE_LEVEL=19
+SCHEDTOOL="auto"
FAIL_IF_NO_SOURCES="yes"
@@ -90,9 +93,9 @@
SKIP_EXISTING_FILES="no"
if [ -x /usr/bin/rpm-getdeps ]; then
- FETCH_BUILD_REQUIRES_RPMGETDEPS="yes"
+ FETCH_BUILD_REQUIRES_RPMGETDEPS="yes"
else
- FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
+ FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
fi
# Here we load saved user environment used to
@@ -111,6 +114,7 @@
#REMOVE_BUILD_REQUIRES="force"
#GROUP_BCONDS="yes"
#LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
+#TITLECHANGE=no
#
SU_SUDO=""
if [ -n "$HOME_ETC" ]; then
@@ -121,7 +125,13 @@
[ -f "$USER_CFG" ] && . "$USER_CFG"
-wget --help 2>&1 | grep -q ' \-\-no-check\-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
+if [ "$SCHEDTOOL" = "auto" ]; then
+ if [ -x /usr/bin/schedtool ] && schedtool -B -e echo >/dev/null; then
+ SCHEDTOOL="schedtool -B -e"
+ else
+ SCHEDTOOL="no"
+ fi
+fi
if [ -n "$USE_PROZILLA" ]; then
GETURI="proz --no-getch -r -P ./ -t$WGET_RETRIES $PROZILLA_OPTS"
@@ -132,8 +142,9 @@
GETURI2="$GETURI"
OUTFILEOPT="-o"
else
- wget --help 2>&1 | grep -q ' \-\-inet ' && WGET_OPTS="$WGET_OPTS --inet"
- wget --help 2>&1 | grep -q ' \-\-retry\-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
+ wget --help 2>&1 | grep -q -- ' --no-check-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
+ wget --help 2>&1 | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS --inet"
+ wget --help 2>&1 | grep -q -- ' --retry-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
GETURI="wget --passive-ftp -c -nd -t$WGET_RETRIES $WGET_OPTS"
GETURI2="wget -c -nd -t$WGET_RETRIES $WGET_OPTS"
@@ -161,10 +172,10 @@
if [ -n "$LASTLOG_FILE" ]; then
echo "LASTLOG=$LOG" > $LASTLOG_FILE
fi
- (nice -n ${DEF_NICE_LEVEL} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE})|tee -a $LOG
+ (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE})|tee -a $LOG
return $exit_pldk
else
- (nice -n ${DEF_NICE_LEVEL} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE}) 1>&2 >/dev/null
+ (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE}) 1>&2 >/dev/null
return `cat ${RES_FILE}`
rm -rf ${RES_FILE}
fi
@@ -231,6 +242,7 @@
-ns, --no-srcs - don't download Sources
-ns0, --no-source0 - don't download Source0
-nn, --no-net - don't download anything from the net
+--no-init - don't initialize builder paths (SPECS and SOURCES)
-ske,
--skip-existing-files - skip existing files in get_files
--opts <rpm opts> - additional options for rpm
@@ -246,12 +258,19 @@
-FRB, --force-remove-build-requires
- remove all you fetched with -R or --fetch-build-requires
remember, this option works without confirmation,
+-sd, --source-distfiles - list sources available from distfiles (intended for offline
+ operations; does not work when Icon field is present
+ but icon file is absent),
+-sdp, --source-distfiles-paths - list sources available from distfiles -
+ paths relative to distfiles directory (intended for offline
+ operations; does not work when Icon field is present
+ but icon file is absent),
-sf, --source-files - list sources - bare filenames (intended for offline
operations; does not work when Icon field is present
- but icon file is absent),
+ but icon file is absent),
-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),
+ 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>
@@ -289,8 +308,8 @@
--with feat1 feat2 feat3 --without feat4 feat5 --with feat6
constructions. Set GROUP_BCONDS to yes to make use of it.
--target <platform>, --target=<platform>
- - build for platform <platform>.
---init-rpm-dir - initialize ~/rpm directory structure
+ - build for platform <platform>.
+--init-rpm-dir - initialize ~/rpm directory structure
"
}
@@ -303,31 +322,41 @@
echo >&2 "$(date +%s.%N) $*"
fi
- msg="builder[$SPECFILE] ${SHELL_TITLE_PREFIX:+$SHELL_TITLE_PREFIX }$msg"
- case "$TERM" in
- cygwin|xterm*)
- echo >&2 -ne "\033]1;$msg\007\033]2;$msg\007"
- ;;
- screen*)
- echo >&2 -ne "\033]0;$msg\007"
- ;;
- esac
+ if [ "x$TITLECHANGE" == "xyes" -o "x$TITLECHANGE" == "x" ]; then
+ local pkg
+ if [ -n "$PACKAGE_NAME" ]; then
+ pkg=${PACKAGE_NAME}-${PACKAGE_VERSION}-${PACKAGE_RELEASE}
+ else
+ pkg=${SPECFILE}
+ fi
+
+ msg="$pkg: ${SHELL_TITLE_PREFIX:+$SHELL_TITLE_PREFIX }$msg"
+ msg="$(echo $msg | tr -d '\n\r')"
+ case "$TERM" in
+ cygwin|xterm*)
+ echo >&2 -ne "\033]1;$msg\007\033]2;$msg\007"
+ ;;
+ screen*)
+ echo >&2 -ne "\033]0;$msg\007"
+ ;;
+ esac
+ fi
}
# set TARGET from BuildArch: from SPECFILE
set_spec_target() {
- if [ -n "$SPECFILE" ] && [ -z "$TARGET" ]; then
- tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
- if [ "$tmp" ]; then
+ if [ -n "$SPECFILE" ] && [ -z "$TARGET" ]; then
+ tmp=$(awk '/^BuildArch:/ { print $NF}' $SPECFILE)
+ if [ "$tmp" ]; then
TARGET="$tmp"
case "$RPMBUILD" in
"rpmbuild")
- TARGET_SWITCH="--target $TARGET" ;;
+ TARGET_SWITCH="--target $TARGET" ;;
"rpm")
- TARGET_SWITCH="--target=$TARGET" ;;
+ TARGET_SWITCH="--target=$TARGET" ;;
esac
- fi
- fi
+ fi
+ fi
}
cache_rpm_dump () {
@@ -344,12 +373,12 @@
# executed here, while none of them are actually needed.
# what we need from dump is NAME, VERSION, RELEASE and PATCHES/SOURCES.
# at the time of this writing macros.build + macros contained 70 "%(...)" macros.
- macrofiles="/usr/lib/rpm/macros:$SPECS_DIR/.rpmmacros:~/etc/.rpmmacros:~/.rpmmacros"
+ macrofiles="/usr/lib/rpm/macros:$SPECS_DIR/.builder-rpmmacros:~/etc/.rpmmacros:~/.rpmmacros"
dump='%{echo:dummy: PACKAGE_NAME %{name} }%dump'
# FIXME: better ideas than .rpmrc?
- printf 'include:/usr/lib/rpm/rpmrc\nmacrofiles:%s\n' $macrofiles > .rpmrc
+ printf 'include:/usr/lib/rpm/rpmrc\nmacrofiles:%s\n' $macrofiles > .builder-rpmrc
# TODO: move these to /usr/lib/rpm/macros
- cat > .rpmmacros <<'EOF'
+ cat > .builder-rpmmacros <<'EOF'
%requires_releq_kernel_up %{nil}
%requires_releq_kernel_smp %{nil}
%requires_releq() %{nil}
@@ -376,7 +405,13 @@
ARGS='--nodigest --nosignature --nobuild'
;;
esac
- $RPMBUILD --rcfile .rpmrc $ARGS --nodeps --define "prep $dump" $BCOND $TARGET_SWITCH $SPECFILE 2>&1
+ if [ "$NOINIT" = "yes" ] ; then
+ cat >> .builder-rpmmacros <<'EOF'
+%_specdir ./
+%_sourcedir ./
+EOF
+ fi
+ $RPMBUILD --rcfile .builder-rpmrc $ARGS $ARGDIRS --nodeps --define "prep $dump" $BCOND $TARGET_SWITCH $SPECFILE 2>&1
`
if [ $? -gt 0 ]; then
error=$(echo "$rpm_dump" | sed -ne '/^error:/,$p')
@@ -410,7 +445,7 @@
return
fi
- rpm_dump_cache="böö" NODIST="yes" UPDATE5= get_files $ICONS
+ rpm_dump_cache="kalasaba" NODIST="yes" UPDATE5= get_files $ICONS
}
parse_spec()
@@ -491,11 +526,11 @@
remove_build_requires
echo "Error: couldn't get out package name/version/release from spec file."
exit 6 ;;
- "err_tag_exists" )
+ "err_tag_exists" )
remove_build_requires
echo "Tag ${2} already exists (spec release: ${3}).";
exit 9 ;;
- "err_fract_rel" )
+ "err_fract_rel" )
remove_build_requires
echo "Release ${2} not integer and not a snapshot.";
exit 10 ;;
@@ -516,8 +551,13 @@
set -v;
fi
- SOURCE_DIR="`eval $RPM $RPMOPTS --eval '%{_sourcedir}'`"
- SPECS_DIR="`eval $RPM $RPMOPTS --eval '%{_specdir}'`"
+ if [ "$NOINIT" != "yes" ] ; then
+ SOURCE_DIR="`eval $RPM $RPMOPTS --eval '%{_sourcedir}'`"
+ SPECS_DIR="`eval $RPM $RPMOPTS --eval '%{_specdir}'`"
+ else
+ SOURCE_DIR="."
+ SPECS_DIR="."
+ fi
__PWD="`pwd`"
}
@@ -556,24 +596,28 @@
unset OPTIONS
[ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $SPECFILE
- set_spec_target
+ set_spec_target
}
find_mirror()
{
cd "$SPECS_DIR"
- url="$1"
+ local url="$1"
if [ ! -f "mirrors" -a "$NOCVSSPEC" != "yes" ] ; then
cvs update mirrors >&2
fi
IFS="|"
- while read origin mirror name rest
- do
+ local origin mirror name rest ol prefix
+ while read origin mirror name rest; do
+ # skip comments and empty lines
+ if [ -z "$origin" ] || [[ $origin == \#* ]]; then
+ continue
+ fi
ol=`echo -n "$origin"|wc -c`
prefix="`echo -n "$url" | head -c $ol`"
if [ "$prefix" = "$origin" ] ; then
- suffix="`echo "$url"|cut -b $ol-`"
+ suffix="`echo "$url"|cut -b $((ol+1))-`"
echo -n "$mirror$suffix"
return 0
fi
@@ -625,14 +669,19 @@
fi
}
+distfiles_path ()
+{
+ echo "by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
+}
+
distfiles_url ()
{
- echo "$PROTOCOL$DISTFILES_SERVER/distfiles/by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
+ echo "$PROTOCOL$DISTFILES_SERVER/distfiles/$(distfiles_path "$1")"
}
distfiles_attic_url ()
{
- echo "$PROTOCOL$ATTICDISTFILES_SERVER/distfiles/Attic/by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
+ echo "$PROTOCOL$ATTICDISTFILES_SERVER/distfiles/Attic/$(distfiles_path "$1")"
}
good_md5 ()
@@ -644,8 +693,8 @@
good_size ()
{
- size="$(find $(nourl "$1") -printf "%s" 2>/dev/null)"
- [ -n "$size" -a "$size" -gt 0 ]
+ size="$(find $(nourl "$1") -printf "%s" 2>/dev/null)"
+ [ -n "$size" -a "$size" -gt 0 ]
}
cvsignore_df ()
@@ -661,46 +710,46 @@
cvsup()
{
- update_shell_title "cvsup"
- local OPTIONS="up "
- if [ -n "$CVSROOT" ]; then
- OPTIONS="-d $CVSROOT $OPTIONS"
- fi
+ update_shell_title "cvsup"
+ local OPTIONS="up "
+ if [ -n "$CVSROOT" ]; then
+ OPTIONS="-d $CVSROOT $OPTIONS"
+ fi
- if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
- OPTIONS="$OPTIONS -A"
- else
- if [ -n "$CVSDATE" ]; then
- OPTIONS="$OPTIONS -D $CVSDATE"
- fi
- if [ -n "$CVSTAG" ]; then
- OPTIONS="$OPTIONS -r $CVSTAG"
- fi
- fi
+ if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
+ OPTIONS="$OPTIONS -A"
+ else
+ if [ -n "$CVSDATE" ]; then
+ OPTIONS="$OPTIONS -D $CVSDATE"
+ fi
+ if [ -n "$CVSTAG" ]; then
+ OPTIONS="$OPTIONS -r $CVSTAG"
+ fi
+ fi
- local result=1
- local retries_counter=0
- if [ $# = 1 ]; then
- update_shell_title "cvsup: $*"
- else
- update_shell_title "cvsup: $# files"
- fi
- while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; do
- retries_counter=$(( $retries_counter + 1 ))
- output=$(LC_ALL=C cvs $OPTIONS "$@" 2>&1)
- result=$?
- [ -n "$output" ] && echo "$output"
- if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out|Unknown host)") && [ "$result" -ne "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; then
- echo "Trying again [$*]... ($retries_counter)"
- update_shell_title "cvsup: retry #$retries_counter"
- sleep 2
- continue
- else
- break
- fi
- done
- update_shell_title "cvsup: done!"
- return $result
+ local result=1
+ local retries_counter=0
+ if [ $# = 1 ]; then
+ update_shell_title "cvsup: $*"
+ else
+ update_shell_title "cvsup: $# files"
+ fi
+ while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; do
+ retries_counter=$(( $retries_counter + 1 ))
+ output=$(LC_ALL=C cvs $OPTIONS "$@" 2>&1)
+ result=$?
+ [ -n "$output" ] && echo "$output"
+ if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out|Unknown host)") && [ "$result" -ne "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; then
+ echo "Trying again [$*]... ($retries_counter)"
+ update_shell_title "cvsup: retry #$retries_counter"
+ sleep 2
+ continue
+ else
+ break
+ fi
+ done
+ update_shell_title "cvsup: done!"
+ return $result
}
get_files()
@@ -729,7 +778,7 @@
update_shell_title "$i"
local fp=`nourl "$i"`
if [ -f "$fp" ] && [ "$SKIP_EXISTING_FILES" = "yes" ]; then
- continue
+ continue
fi
if [ -n "$UPDATE5" ]; then
if [ -n "$ADD5" ]; then
@@ -780,7 +829,7 @@
update_shell_title "${GETURI%% *}: $url_attic"
${GETURI} ${OUTFILEOPT} "$target" "$url_attic" || \
if [ "`echo $url_attic | grep -E 'ftp://'`" ]; then
- update_shell_title "${GETURI2%% *}: $url_attic"
+ update_shell_title "${GETURI2%% *}: $url_attic"
${GETURI2} ${OUTFILEOPT} "$target" "$url_attic"
fi
fi
@@ -807,10 +856,10 @@
else
im="$i"
fi
- update_shell_title "${GETURI%% *}: $im"
+ update_shell_title "${GETURI%% *}: $im"
${GETURI} "$im" || \
if [ "`echo $im | grep -E 'ftp://'`" ]; then
- update_shell_title "${GETURI2%% *}: $im"
+ update_shell_title "${GETURI2%% *}: $im"
${GETURI2} "$im"
fi
fi
@@ -849,7 +898,7 @@
update_shell_title "${GETURI%% *}: $url"
${GETURI} ${OUTFILEOPT} "$target" "$url" || \
if [ "`echo $url | grep -E 'ftp://'`" ]; then
- update_shell_title "${GETURI2%% *}: $url"
+ update_shell_title "${GETURI2%% *}: $url"
${GETURI2} ${OUTFILEOPT} "$target" "$url"
fi
if ! test -s "$target"; then
@@ -857,7 +906,7 @@
update_shell_title "${GETURI%% *}: $url_attic"
${GETURI} ${OUTFILEOPT} "$target" "$url_attic" || \
if [ "`echo $url_attic | grep -E 'ftp://'`" ]; then
- update_shell_title "${GETURI2%% *}: $url_attic"
+ update_shell_title "${GETURI2%% *}: $url_attic"
${GETURI2} ${OUTFILEOPT} "$target" "$url_attic"
fi
fi
@@ -875,7 +924,7 @@
SHELL_TITLE_PREFIX=""
if [ "$get_files_cvs" ]; then
- cvsup $get_files_cvs
+ cvsup $get_files_cvs
fi
if [ "$CHMOD" = "yes" ]; then
@@ -888,21 +937,20 @@
}
make_tagver() {
+ if [ -n "$DEBUG" ]; then
+ set -x;
+ set -v;
+ fi
- if [ -n "$DEBUG" ]; then
- set -x;
- set -v;
- fi
-
- # Check whether first character of PACKAGE_NAME is legal for tag name
- if [ -z "${PACKAGE_NAME##[_0-9]*}" -a -z "$TAG_PREFIX" ]; then
- TAG_PREFIX=tag_
- fi
- TAGVER=$TAG_PREFIX$PACKAGE_NAME-`echo $PACKAGE_VERSION | sed -e "s/\./\_/g" -e "s/@/#/g"`-`echo $PACKAGE_RELEASE | sed -e "s/\./\_/g" -e "s/@/#/g"`
- # Remove #kernel.version_release from TAGVER because tagging sources
- # could occur with different kernel-headers than kernel-headers used at build time.
- TAGVER=$(echo "$TAGVER" | sed -e 's/#.*//g')
- echo -n "$TAGVER"
+ # Check whether first character of PACKAGE_NAME is legal for tag name
+ if [ -z "${PACKAGE_NAME##[_0-9]*}" -a -z "$TAG_PREFIX" ]; then
+ TAG_PREFIX=tag_
+ fi
+ TAGVER=$TAG_PREFIX$PACKAGE_NAME-`echo $PACKAGE_VERSION | sed -e "s/\./\_/g" -e "s/@/#/g"`-`echo $PACKAGE_RELEASE | sed -e "s/\./\_/g" -e "s/@/#/g"`
+ # Remove #kernel.version_release from TAGVER because tagging sources
+ # could occur with different kernel-headers than kernel-headers used at build time.
+ TAGVER=$(echo "$TAGVER" | sed -e 's/#.*//g')
+ echo -n "$TAGVER"
}
tag_files()
@@ -1009,7 +1057,7 @@
cd "$SPECS_DIR"
if [ -n "$TRY_UPGRADE" ]; then
- update_shell_title "build_package: try_upgrade"
+ update_shell_title "build_package: try_upgrade"
if [ -n "$FLOAT_VERSION" ]; then
TNOTIFY=`./pldnotify.awk $SPECFILE -n` || exit 1
else
@@ -1055,7 +1103,7 @@
echo "LASTLOG=$LOG" > $LASTLOG_FILE
fi
RES_FILE=~/tmp/$RPMBUILD-exit-status.$RANDOM
- (time eval nice -n ${DEF_NICE_LEVEL} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $TARGET_SWITCH $SPECFILE; echo $? > $RES_FILE) 2>&1 |tee $LOG
+ (time eval ${NICE_COMMAND} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND $TARGET_SWITCH $SPECFILE; echo $? > $RES_FILE) 2>&1 |tee $LOG
RETVAL=`cat $RES_FILE`
rm $RES_FILE
if [ -n "$LOGDIROK" ] && [ -n "$LOGDIRFAIL" ]; then
@@ -1066,12 +1114,12 @@
fi
fi
else
- eval nice -n ${DEF_NICE_LEVEL} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $TARGET_SWITCH $SPECFILE
+ eval ${NICE_COMMAND} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND $TARGET_SWITCH $SPECFILE
RETVAL=$?
fi
if [ "$RETVAL" -ne "0" ]; then
if [ -n "$TRY_UPGRADE" ]; then
- echo "\n!!! Package with new version cannot be build automagically\n"
+ echo "\n!!! Package with new version cannot be built automagically\n"
mv -f $SPECFILE.bak $SPECFILE
fi
Exit_error err_build_fail;
@@ -1280,24 +1328,24 @@
spawn_sub_builder()
{
- package_name="${1}"
- update_shell_title "spawn_sub_builder $package_name"
+ package_name="${1}"
+ update_shell_title "spawn_sub_builder $package_name"
- sub_builder_opts=''
- if [ "${FETCH_BUILD_REQUIRES}" == "yes" ]; then
- sub_builder_opts="${sub_builder_opts} -R"
- fi
- if [ "${REMOVE_BUILD_REQUIRES}" == "nice" ]; then
- sub_builder_opts="${sub_builder_opts} -RB"
- elif [ "${REMOVE_BUILD_REQUIRES}" == "force" ]; then
- sub_builder_opts="${sub_builder_opts} -FRB"
- fi
- if [ "${UPDATE_POLDEK_INDEXES}" == "yes" ]; then
- sub_builder_opts="${sub_builder_opts} -Upi"
- fi
+ sub_builder_opts=''
+ if [ "${FETCH_BUILD_REQUIRES}" == "yes" ]; then
+ sub_builder_opts="${sub_builder_opts} -R"
+ fi
+ if [ "${REMOVE_BUILD_REQUIRES}" == "nice" ]; then
+ sub_builder_opts="${sub_builder_opts} -RB"
+ elif [ "${REMOVE_BUILD_REQUIRES}" == "force" ]; then
+ sub_builder_opts="${sub_builder_opts} -FRB"
+ fi
+ if [ "${UPDATE_POLDEK_INDEXES}" == "yes" ]; then
+ sub_builder_opts="${sub_builder_opts} -Upi"
+ fi
- cd "${SPECS_DIR}"
- ./builder ${sub_builder_opts} "$@"
+ cd "${SPECS_DIR}"
+ ./builder ${sub_builder_opts} "$@"
}
remove_build_requires()
@@ -1335,10 +1383,10 @@
display_branches()
{
- if [ "$NOCVSSPEC" != "yes" ]; then
- echo -ne "Available branches: "
- cvs status -v "${SPECFILE}" | awk '!/Sticky Tag:/ && /\(branch:/ { print $1 } ' | xargs
- fi
+ if [ "$NOCVSSPEC" != "yes" ]; then
+ echo -ne "Available branches: "
+ cvs status -v "${SPECFILE}" | awk '!/Sticky Tag:/ && /\(branch:/ { print $1 } ' | xargs
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/builder?r1=1.13&r2=1.14&f=u
More information about the pld-cvs-commit
mailing list