7 # 2 - no spec file name in cmdl parameters
8 # 3 - spec file not stored in repo
9 # 4 - some source, patch or icon files not stored in repo
10 # 5 - package build failed
11 # 6 - spec file with errors
14 # - builder -u fetches current version first
15 # - tries to get new version from distfiles without new md5
16 # - after fetching new version doesn't update md5
17 # - doesn't get sources for specs with %include /usr/lib/rpm/macros.python
18 # when there's no rpm-pythonprov (rpm's fault, but it's ugly anyway)
19 # - as above with %include /usr/lib/rpm/macros.perl and no rpm-perlprov
22 Build package utility from PLD CVS repository
23 V 0.11 (C) 1999-2003 Free Penguins".
24 PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
40 ALWAYS_CVSUP=${ALWAYS_CVSUP:-"yes"}
41 if [ -s CVS/Root ]; then
42 CVSROOT=$(cat CVS/Root)
44 CVSROOT=${CVSROOT:-""}
46 # Example: LOGFILE='../log.$PACKAGE_NAME'
47 # Yes, you can use variable name! Note _single_ quotes!
67 WGET_RETRIES=${MAX_WGET_RETRIES:-0}
68 CVS_RETRIES=${MAX_CVS_RETRIES:-1000}
73 CVS_SERVER="cvs.pld-linux.org"
74 DISTFILES_SERVER="://distfiles.pld-linux.org"
78 FAIL_IF_NO_SOURCES="yes"
80 GETURI="wget --passive-ftp -c -nd -t$WGET_RETRIES --inet"
81 GETURI2="wget -c -nd -t$WGET_RETRIES --inet"
84 if (rpm --version 2>&1 | grep -q '4.0.[0-2]'); then
92 if [ -f ~/etc/builderrc ]; then
94 elif [ -f ~/.builderrc ]; then
98 #---------------------------------------------
103 if [ -n "$DEBUG" ]; then set -xv; fi
105 Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
107 [-bb|--build-binary] [-bs|--build-source] [-u|--try-upgrade]
108 [{-B|--branch} <branch>] [{-d|--cvsroot} <cvsroot>] [-g|--get]
109 [-h|--help] [--http] [{-l,--logtofile} <logfile>] [-m|--mr-proper]
110 [-q|--quiet] [--date <yyyy-mm-dd> [-r <cvstag>] [{-T--tag <cvstag>]
111 [-Tvs|--tag-version-stable] [-Tvn|--tag-version-nest]
112 [-Ts|--tag-stable] [-Tn|--tag-nest] [-Tv|--tag-version]
113 [-nu|--no-urls] [-v|--verbose] [--opts <rpm opts>]
114 [--with/--without <feature>] [--define <macro> <value>] <package>[.spec]
117 - update md5 comments in spec, implies -nd -ncs
118 -a5, --add-md5 - add md5 comments to URL sources, implies -nc -nd -ncs
119 -D, --debug - enable script debugging mode,
120 -V, --version - output builder version
121 -a, --as_anon - get files via pserver as cvs@$CVS_SERVER,
123 --build - get all files from CVS repo or HTTP/FTP and build
124 package from <package>.spec,
126 - get all files from CVS repo or HTTP/FTP and build
127 binary only package from <package>.spec,
129 --build-source - get all files from CVS repo or HTTP/FTP and only
130 pack them into src.rpm,
131 -B, --branch - add branch
132 -c, --clean - clean all temporarily created files (in BUILD,
133 SOURCES, SPECS and \$RPM_BUILD_ROOT),
134 -d <cvsroot>, --cvsroot <cvsroot>
136 --define <macro> <value>
137 - define a macro <macro> with value <value>,
138 -g, --get - get <package>.spec and all related files from
139 CVS repo or HTTP/FTP,
140 -h, --help - this message,
141 --http - use http instead of ftp,
142 -l <logfile>, --logtofile <logfile>
144 -m, --mr-proper - only remove all files related to spec file and
146 -nc, --no-cvs - don't download sources from CVS, if source URL is
149 - don't check specs in CVS
151 - don't download from distfiles
152 -nm, --no-mirrors - don't download from mirror, if source URL is given,
153 -nu, --no-urls - don't try to download from FTP/HTTP location,
154 -ns, --no-srcs - don't download Sources
156 - don't download Source0
158 - additional options for rpm
159 -q, --quiet - be quiet,
161 - build package using resources from specified CVS
163 -r <cvstag>, --cvstag <cvstag>
164 - build package using resources from specified CVS
166 -T <cvstag> , --tag <cvstag>
167 - add cvs tag <cvstag> for files,
168 -Tvs, --tag-version-stable
169 - add cvs tags STABLE and NAME-VERSION-RELESE for files,
170 -Tvn, --tag-version-nest
171 - add cvs tags NEST and NAME-VERSION-RELESE for files,
173 - add cvs tag STABLE for files,
175 - add cvs tag NEST for files,
177 - add cvs tag NAME-VERSION-RELESE for files,
178 -v, --verbose - be verbose,
180 - check version, and try to upgrade package
181 -un, --try-upgrade-with-float-version
182 - as above, but allow float version
184 - refetch sources, don't use distfiles, and update md5
186 --with/--without <feature>
187 - conditional build package depending on
188 %_with_<feature>/%_without_<feature> macro
197 rpm -bp --nodeps --define 'prep %dump' $BCOND $SPECFILE 2>&1
200 rpmbuild --nodigest --nosignature --define 'prep %dump' $BCOND $SPECFILE 2>&1
203 if [ $? -ne 0 ]; then
210 if [ -z "$rpm_dump_cache" ] ; then
211 echo "internal error: cache_rpm_dump not called!" 1>&2
213 echo "$rpm_dump_cache"
218 if [ -n "$DEBUG" ]; then
227 if [ "$NOSRCS" != "yes" ]; then
228 SOURCES="`rpm_dump | awk '/SOURCEURL[0-9]+/ {print $3}'`"
230 if (rpm_dump | grep -qEi ":.*nosource.*1"); then
231 FAIL_IF_NO_SOURCES="no"
234 PATCHES="`rpm_dump | awk '/PATCHURL[0-9]+/ {print $3}'`"
235 ICONS="`awk '/^Icon:/ {print $2}' ${SPECFILE}`"
236 PACKAGE_NAME="`$RPM -q --qf '%{NAME}\n' --specfile ${SPECFILE} 2> /dev/null | head -1`"
237 PACKAGE_VERSION="`$RPM -q --qf '%{VERSION}\n' --specfile ${SPECFILE} 2> /dev/null| head -1`"
238 PACKAGE_RELEASE="`$RPM -q --qf '%{RELEASE}\n' --specfile ${SPECFILE} 2> /dev/null | head -1`"
240 if [ -n "$BE_VERBOSE" ]; then
241 echo "- Sources : `nourl $SOURCES`"
242 if [ -n "$PATCHES" ]; then
243 echo "- Patches : `nourl $PATCHES`"
245 echo "- Patches : *no patches needed*"
247 if [ -n "$ICONS" ]; then
248 echo "- Icon : `nourl $ICONS`"
250 echo "- Icon : *no package icon*"
252 echo "- Name : $PACKAGE_NAME"
253 echo "- Version : $PACKAGE_VERSION"
254 echo "- Release : $PACKAGE_RELEASE"
260 if [ -n "$DEBUG" ]; then
268 "err_no_spec_in_cmdl" )
269 echo "ERROR: spec file name not specified.";
271 "err_no_spec_in_repo" )
272 echo "Error: spec file not stored in CVS repo.";
274 "err_no_source_in_repo" )
275 echo "Error: some source, patch or icon files not stored in CVS repo. ($2)";
278 echo "Error: package build failed. (${2:-no more info})";
285 if [ -n "$DEBUG" ]; then
290 SOURCE_DIR="`$RPM --eval '%{_sourcedir}'`"
291 SPECS_DIR="`$RPM --eval '%{_specdir}'`"
298 if [ -n "$DEBUG" ]; then
303 if [ "$NOCVSSPEC" != "yes" ]; then
308 if [ -n "$CVSROOT" ]; then
309 OPTIONS="-d $CVSROOT $OPTIONS"
311 if [ ! -s CVS/Root -a "$NOCVSSPEC" != "yes" ]; then
312 echo "warning: No cvs access defined - using local .spec file"
317 if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
318 OPTIONS="$OPTIONS -A"
320 if [ -n "$CVSDATE" ]; then
321 OPTIONS="$OPTIONS -D $CVSDATE"
323 if [ -n "$CVSTAG" ]; then
324 OPTIONS="$OPTIONS -r $CVSTAG"
330 while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; do
331 retries_counter=$(( $retries_counter + 1 ))
332 output=$(LC_ALL=C cvs $OPTIONS $SPECFILE 2>&1)
334 [ -n "$output" ] && echo "$output"
335 if [ "$result" -ne "0" ]; then
336 if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out)") && [ "$retries_counter" -le "$CVS_RETRIES" ]; then
337 echo "Trying again [$SPECFILE]... ($retries_counter)"
341 Exit_error err_no_spec_in_repo;
345 if [ ! -f "$SPECFILE" ]; then
346 Exit_error err_no_spec_in_repo;
349 if [ "$CHMOD" = "yes" -a -n "$SPECFILE" ]; then
350 chmod $CHMOD_MODE $SPECFILE
353 grep -E -m 1 "^#.*Revision:.*Date" $SPECFILE
360 if [ ! -f "mirrors" -a "$NOCVSSPEC" != "yes" ] ; then
361 cvs update mirrors >&2
365 while read origin mirror name rest; do
366 ol=`echo -n "$origin"|wc -c`
367 prefix="`echo -n "$url" | head -c $ol`"
368 if [ "$prefix" = "$origin" ] ; then
369 suffix="`echo "$url"|cut -b $ol-`"
370 echo -n "$mirror$suffix"
381 grep "SOURCEURL[0-9]*[ ]*$1""[ ]*$" | \
382 sed -e 's/.*SOURCEURL\([0-9][0-9]*\).*/\1/' | \
389 [ -z "$no" ] && return
391 spec_rev=$(grep $SPECFILE CVS/Entries | sed -e s:/$SPECFILE/:: -e s:/.*::)
392 if [ -z "$spec_rev" ]; then
393 spec_rev="$(head -1 $SPECFILE | sed -e 's/.*\$Revision: \([0-9.]*\).*/\1/')"
395 spec="$SPECFILE[0-9.,]*,$(echo $spec_rev | sed 's/\./\\./g')"
396 md5=$(grep -s -v '^#' additional-md5sums | \
397 grep -E "[ ]$(basename "$1")[ ]+${spec}([ ,]|\$)" | \
398 sed -e 's/^\([0-9a-f]\{32\}\).*/\1/' | \
399 grep -E '^[0-9a-f]{32}$')
400 if [ X"$md5" = X"" ] ; then
401 grep -i "#[ ]*Source$no-md5[ ]*:" $SPECFILE | sed -e 's/.*://' | xargs
403 if [ $(echo "$md5" | wc -l) != 1 ] ; then
404 echo "$SPECFILE: more then one entry in additional-md5sums for $1" 1>&2
406 echo "$md5" | tail -1
412 echo "$PROTOCOL$DISTFILES_SERVER/by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
419 [ "$md5" = "$(md5sum $(nourl "$1") 2> /dev/null | sed -e 's/ .*//')" ]
426 if [ -n "$DEBUG" ]; then
431 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
435 if [ -n "$CVSROOT" ]; then
436 OPTIONS="-d $CVSROOT $OPTIONS"
438 if [ ! -s CVS/Root -a "$NOCVS" != "yes" ]; then
439 echo "warning: No cvs access defined for SOURCES"
443 if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
444 OPTIONS="$OPTIONS -A"
446 if [ -n "$CVSDATE" ]; then
447 OPTIONS="$OPTIONS -D $CVSDATE"
449 if [ -n "$CVSTAG" ]; then
450 OPTIONS="$OPTIONS -r $CVSTAG"
453 for i in $GET_FILES; do
454 if [ -n "$UPDATE5" ]; then
455 if [ -n "$ADD5" ]; then
456 [ `nourl $i` = "$i" ] && continue
457 grep -qiE '^#[ ]*Source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE && continue
459 grep -qiE '^#[ ]*Source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE || continue
463 if [ ! -f `nourl $i` ] || [ $ALWAYS_CVSUP = "yes" ]; then
464 if echo $i | grep -vE '(http|ftp|https|cvs|svn)://' | grep -qE '\.(gz|bz2)$']; then
465 echo "Warning: no URL given for $i"
468 if [ -n "$(src_md5 "$i")" ] && [ -z "$NODIST" ]; then
469 if good_md5 "$i"; then
470 echo "$(nourl "$i") having proper md5sum already exists"
474 url=$(distfiles_url "$i")
475 if [ `echo $url | grep -E '^(\.|/)'` ]; then
476 ${GETLOCAL} $url $target
479 if [ -z "$NOMIRRORS" ]; then
480 url="`find_mirror "$url"`"
482 ${GETURI} -O "$target" "$url" || \
483 if [ `echo $url | grep -E 'ftp://'` ]; then
484 ${GETURI2} -O "$target" "$url"
486 test -s "$target" || rm -f "$target"
488 elif [ -z "$(src_md5 "$i")" -a "$NOCVS" != "yes" ] && \
489 ( echo $i | grep -qvE '(ftp|http|https)://' ); then
492 while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; do
493 retries_counter=$(( $retries_counter + 1 ))
494 output=$(LC_ALL=C cvs $OPTIONS `nourl $i` 2>&1)
496 [ -n "$output" ] && echo "$output"
497 if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out)") && [ "$result" -ne "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; then
498 echo "Trying again [`nourl $i`]... ($retries_counter)"
507 if [ -z "$NOURLS" ] && [ ! -f "`nourl $i`" -o -n "$UPDATE" ] && [ `echo $i | grep -E 'ftp://|http://|https://'` ]; then
508 if [ -z "$NOMIRRORS" ]; then
509 im="`find_mirror "$i"`"
514 if [ `echo $im | grep -E 'ftp://'` ]; then ${GETURI2} "$im" ; fi
520 if [ ! -f "`nourl $i`" -a "$FAIL_IF_NO_SOURCES" != "no" ]; then
521 Exit_error err_no_source_in_repo $i;
522 elif [ -n "$UPDATE5" ] && \
523 ( ( [ -n "$ADD5" ] && echo $i | grep -q -E 'ftp://|http://|https://' && \
524 [ -z "$(grep -E -i '^NoSource[ ]*:[ ]*'$i'([ ]|$)' $SPECS_DIR/$SPECFILE)" ] ) || \
525 grep -q -i -E '^#[ ]*source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE )
527 echo "Updating source-$srcno md5."
528 md5=$(md5sum `nourl $i` | cut -f1 -d' ')
530 print unless /^\s*#\s*Source'$srcno'-md5\s*:/i;
531 print "# Source'$srcno'-md5:\t'$md5'\n"
532 if /^Source'$srcno'\s*:\s+/;
537 if good_md5 "$i"; then
539 elif [ "$FROM_DISTFILES" = 1 ]; then
540 # wrong md5 from distfiles: remove the file and try again
542 echo "MD5 sum mismatch. Trying full fetch."
545 ${GETURI} -O "$target" "$url" || \
546 if [ `echo $url | grep -E 'ftp://'` ]; then
547 ${GETURI2} -O "$target" "$url"
549 test -s "$target" || rm -f "$target"
552 if good_md5 "$i"; then
555 echo "MD5 sum mismatch. Use -U to refetch sources,"
556 echo "or -5 to update md5 sums, if you're sure files are correct."
557 Exit_error err_no_source_in_repo $i
561 if [ "$CHMOD" = "yes" ]; then
562 CHMOD_FILES="`nourl $GET_FILES`"
563 if [ -n "$CHMOD_FILES" ]; then
564 chmod $CHMOD_MODE $CHMOD_FILES
575 if [ -n "$DEBUG" ]; then
580 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
581 echo "Version: $PACKAGE_VERSION"
582 echo "Release: $PACKAGE_RELEASE"
583 TAGVER=$PACKAGE_NAME-`echo $PACKAGE_VERSION | sed -e "s/\./\_/g" -e "s/@/#/g"`-`echo $PACKAGE_RELEASE | sed -e "s/\./\_/g" -e "s/@/#/g"`
584 if [ "$TAG_VERSION" = "yes" ]; then
585 echo "CVS tag: $TAGVER"
587 if [ -n "$TAG" ]; then
592 if [ -n "$CVSROOT" ]; then
593 OPTIONS="-d $CVSROOT $OPTIONS"
597 for i in $TAG_FILES; do
598 if [ -f `nourl $i` ]; then
599 if [ "$TAG_VERSION" = "yes" ]; then
600 cvs $OPTIONS $TAGVER `nourl $i`
602 if [ -n "$TAG" ]; then
603 cvs $OPTIONS $TAG `nourl $i`
606 Exit_error err_no_source_in_repo $i
611 if [ "$TAG_VERSION" = "yes" ]; then
612 cvs $OPTIONS $TAGVER $SPECFILE
614 if [ -n "$TAG" ]; then
615 cvs $OPTIONS $TAG $SPECFILE
625 echo "CVS branch tag: $TAG"
630 if [ -n "$DEBUG" ]; then
635 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
638 if [ -n "$CVSROOT" ]; then
639 OPTIONS="-d $CVSROOT $OPTIONS"
642 for i in $TAG_FILES; do
643 if [ -f `nourl $i` ]; then
644 cvs $OPTIONS $TAG `nourl $i`
646 Exit_error err_no_source_in_repo $i
650 cvs $OPTIONS $TAG $SPECFILE
660 if [ -n "$DEBUG" ]; then
667 if [ -n "$TRY_UPGRADE" ]; then
669 if [ -n "FLOAT_VERSION" ]; then
670 TNOTIFY=`./pldnotify.awk $SPECFILE -n`
672 TNOTIFY=`./pldnotify.awk $SPECFILE`
675 TNEWVER=`echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }'`
677 if [ -n "$TNEWVER" ]; then
679 TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
681 echo "New version found, updating spec file to version " $TNEWVER
683 cp -f $SPECFILE $SPECFILE.bak
687 eval "perl -pi -e 's/Version:\t"$TOLDVER"/Version:\t"$TNEWVER"/gs' $SPECFILE"
688 eval "perl -pi -e 's/Release:\t[1-9]{0,4}/Release:\t1/' $SPECFILE"
692 get_files "$SOURCES $PATCHES";
694 unset TOLDVER TNEWVER TNOTIFY
704 BUILD_SWITCH="-ba" ;;
706 BUILD_SWITCH="-bb" ;;
708 BUILD_SWITCH="-bs --nodeps" ;;
710 if [ -n "$LOGFILE" ]; then
711 if [ -n "$CVSTAG" ]; then
712 LTAG="r_`echo $CVSTAG|sed -e 's/\./_/g'`_"
716 LOG=`eval echo $LOGFILE`
717 if [ -n "$LASTLOG_FILE" ]; then
718 echo "LASTLOG=$LOG" > $LASTLOG_FILE
720 RES_FILE=~/tmp/$RPMBUILD-exit-status.$RANDOM
721 (nice -n ${DEF_NICE_LEVEL} time $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $SPECFILE; echo $? > $RES_FILE) 2>&1 |tee $LOG
722 RETVAL=`cat $RES_FILE`
724 if [ -n "$LOGDIROK" ] && [ -n "$LOGDIRFAIL" ]; then
725 if [ "$RETVAL" -eq "0" ]; then
732 eval nice -n ${DEF_NICE_LEVEL} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $SPECFILE
736 if [ "$RETVAL" -ne "0" ]; then
738 if [ -n "$TRY_UPGRADE" ]; then
739 echo "\n!!! Package with new version cannot be build automagically\n"
740 mv -f $SPECFILE.bak $SPECFILE
743 Exit_error err_build_fail;
751 echo "$@" | sed 's#\<\(ftp\|http\|https\|cvs\|svn\)://[^ ]*/##g'
754 #---------------------------------------------
757 if [ "$#" = 0 ]; then
762 while test $# -gt 0 ; do
779 DEBUG="yes"; shift ;;
781 COMMAND="version"; shift ;;
783 CVSROOT=":pserver:cvs@$CVS_SERVER:/cvsroot"; shift ;;
785 COMMAND="build"; shift ;;
786 -bb | --build-binary )
787 COMMAND="build-binary"; shift ;;
788 -bs | --build-source )
789 COMMAND="build-source"; shift ;;
791 COMMAND="branch"; shift; TAG="${1}"; shift;;
793 CLEAN="--clean --rmspec --rmsource"; shift ;;
795 shift; CVSROOT="${1}"; shift ;;
797 COMMAND="get"; shift ;;
799 COMMAND="usage"; shift ;;
801 PROTOCOL="http"; shift ;;
803 shift; LOGFILE="${1}"; shift ;;
805 shift; DEF_NICE_LEVEL=${1}; shift ;;
807 COMMAND="mr-proper"; shift ;;
809 NOCVS="yes"; shift ;;
810 -ncs | --no-cvs-specs )
811 NOCVSSPEC="yes"; shift ;;
812 -nd | --no-distfiles )
813 NODIST="yes"; shift ;;
815 NOMIRRORS="yes"; shift ;;
817 NOURLS="yes"; shift ;;
819 NOSRCS="yes"; shift ;;
820 -ns0 | --no-source0 )
821 NOSOURCE0="yes"; shift ;;
823 shift; RPMOPTS="${1}"; shift ;;
825 BCOND="$BCOND $1 $2" ; shift 2 ;;
827 QUIET="--quiet"; shift ;;
829 CVSDATE="${2}"; shift 2 ;;
831 shift; CVSTAG="${1}"; shift ;;
832 -Tvs | --tag-version-stable )
837 -Tvn | --tag-version-nest )
852 -Tv | --tag-version )
870 TRY_UPGRADE="1"; shift ;;
871 -un | --try-upgrade-with-float-version )
872 TRY_UPGRADE="1"; FLOAT_VERSION="1"; shift ;;
874 BE_VERBOSE="1"; shift ;;
880 RPMOPTS="${RPMOPTS} --define \"${MACRO} ${VALUE}\""
883 SPECFILE="`basename ${1} .spec`.spec"; shift ;;
887 if [ -n "$DEBUG" ]; then
893 "build" | "build-binary" | "build-source" )
895 if [ -n "$SPECFILE" ]; then
899 if [ -n "$FAIL_IF_CHANGED_BUT_NOT_BUMPED" ]; then
900 TAGVER=$PACKAGE_NAME-`echo $PACKAGE_VERSION | sed -e "s/\./\_/g" -e "s/@/#/g"`-`echo $PACKAGE_RELEASE | sed -e "s/\./\_/g" -e "s/@/#/g"`
901 CURTAGREL=$(cvs status $SPECFILE | grep "Working revision:" | awk '{ print $3 }')
902 TAGREL=$(cvs status -v $SPECFILE | grep -E "^[[:space:]]*${TAGVER}[[[:space:]]" | sed -e 's#.*(revision: ##g' -e 's#).*##g')
904 if [ -n "$TAGREL" -a "$TAGREL" != "$CURTAGREL" ]; then
905 Exit_error err_build_fail "not bumped ver-rel - was already used in rev $TAGREL"
909 if [ -n "$ICONS" ]; then
913 if [ -n "$NOSOURCE0" ] ; then
914 SOURCES=`echo $SOURCES | xargs | sed -e 's/[^ ]*//'`
916 get_files "$SOURCES $PATCHES";
919 Exit_error err_no_spec_in_cmdl;
924 if [ -n "$SPECFILE" ]; then
927 if [ -n "$ICONS" ]; then
931 get_files $SOURCES $PATCHES;
932 branch_files $TAG "$SOURCES $PATCHES $ICONS";
934 Exit_error err_no_spec_in_cmdl;
939 if [ -n "$SPECFILE" ]; then
942 if [ -n "$ICONS" ]; then
946 if [ -n "$NOSOURCE0" ] ; then
947 SOURCES=`echo $SOURCES | xargs | sed -e 's/[^ ]*//'`
949 get_files $SOURCES $PATCHES
951 Exit_error err_no_spec_in_cmdl;
956 if [ -n "$SPECFILE" ]; then
959 if [ -n "$ICONS" ]; then
963 get_files $SOURCES $PATCHES;
964 tag_files "$SOURCES $PATCHES $ICONS";
966 Exit_error err_no_spec_in_cmdl;
970 $RPM --clean --rmsource --rmspec --force --nodeps $SPECFILE