]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- man.szczecin.pl unresponsive
[packages/rpm-build-tools.git] / builder.sh
index 1f022bfe3f9ecc2590939206d80d1b6da9b421b4..a1937f784bb5a77a06db0a254df607858a9e831b 100755 (executable)
@@ -39,7 +39,7 @@ RCSID='$Id: builder,v 1.645 2011/02/13 17:54:10 glen Exp $' r=${RCSID#* * } rev=
 VERSION="v0.35/$rev"
 VERSIONSTRING="\
 Build package utility from PLD Linux Packages repository
-$VERSION (C) 1999-2012 Free Penguins".
+$VERSION (C) 1999-2014 Free Penguins".
 
 CLEAN_PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
 
@@ -77,13 +77,18 @@ DATE=`date +%Y-%m-%d_%H-%M-%S`
 # target arch, can also be used for log file naming
 TARGET=$(rpm -E %{_target})
 
+# Note the *single* quotes, this allows using shell variables expanded at build time
 # Example: LOGFILE='../log.$PACKAGE_NAME'
 # Example: LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
 # Example: LOGFILE='$PACKAGE_NAME/$PACKAGE_NAME.$DATE.log'
 # Example: LOGFILE='$PACKAGE_NAME.$DATE.log'
-# Yes, you can use variable name! Note _single_ quotes!
+# Example: LOGFILE='.log.$PACKAGE_NAME-$PACKAGE_VERSION-$PACKAGE_RELEASE.$TARGET.$DATE'
 LOGFILE=''
 
+# use teeboth Perl wrapper
+# temporary option to disable if broken
+USE_TEEBOTH=yes
+
 LOGDIR=""
 LOGDIROK=""
 LOGDIRFAIL=""
@@ -241,6 +246,7 @@ fi
 POLDEK_INDEX_DIR="$($RPM --eval %_rpmdir)/"
 POLDEK_CMD="$SU_SUDO /usr/bin/poldek --noask"
 
+# TODO: add teeboth
 run_poldek() {
        RES_FILE=$(tempfile)
        if [ -n "$LOGFILE" ]; then
@@ -249,6 +255,7 @@ run_poldek() {
                        echo "LASTLOG=$LOG" > $LASTLOG_FILE
                fi
                (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE})|tee -a $LOG
+               # FIXME $exit_pldk undefined
                return $exit_pldk
        else
                (${NICE_COMMAND} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE}) 1>&2 >/dev/null
@@ -462,13 +469,13 @@ insert_gitlog() {
        # rpm5.org/rpm.org do not parse any other date format than 'Wed Jan 1 1997'
        # otherwise i'd use --date=iso here
        # http://rpm5.org/cvs/fileview?f=rpm/build/parseChangelog.c&v=2.44.2.1
-       # http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/parseChangelog.c#l31
+       # http://rpm.org/gitweb?p=rpm.git;a=blob;f=build/parseChangelog.c;h=56ba69daa41d65ec9fd18c9f371b8ff14118cdca;hb=a113baa510a004476edc44b5ebaaf559238a18b6#l33
        # NOTE: changelog date is always in UTC for rpmbuild
        # * 1265749244 +0000 Random Hacker <nikt@pld-linux.org> 9370900
        git rev-list --date-order -${log_entries:-20} HEAD 2>/dev/null | while read sha1; do
                local logfmt='%B%n'
-               git notes list $sha1 > /dev/null 2>&1 && logfmt=%N
-               git log -n 1 $sha1 --format=format:"* %ad %an <%ae> %h%n${logfmt}%n" --date=raw | sed '/^$/q'
+               git notes list $sha1 > /dev/null 2>&1 && logfmt='%N'
+               git log -n 1 $sha1 --format=format:"* %ad %an <%ae> %h%n- ${logfmt}%n" --date=raw | sed -re 's/^- +- */- /'| sed '/^$/q'
        done > $gitlog
 
        # add link to full git logs
@@ -493,6 +500,29 @@ insert_gitlog() {
        echo $specdir
 }
 
+# @param string logfile
+# @param varargs... commands to execute
+teeboth() {
+       local rc
+       # use teeboth from toys/cleanbuild, if available and enabled
+       if [ "$USE_TEEBOTH" = "yes" ] && [ -x $APPDIR/teeboth ]; then
+               $APPDIR/teeboth "$@"
+               rc=$?
+       else
+               local efile rc logfile=$1; shift
+               if [ "$logfile" ]; then
+                       efile=$(tempfile)
+                       { "$@" 2>&1; echo $? > $efile; } | tee -a $logfile
+                       rc=$(< $efile)
+                       rm -f $efile
+               else
+                       "$@"
+                       rc=$?
+               fi
+       fi
+       return $rc
+}
+
 # change dependency to specname
 # common changes:
 # - perl(Package::Name) -> perl-Package-Name
@@ -552,10 +582,7 @@ set_spec_target() {
 
 # runs rpm with minimal macroset
 minirpm() {
-       # we reset macros not to contain macros.build as all the %() macros are
-       # executed here, while none of them are actually needed.
-       # at the time of this writing macros.build + macros contained 70 "%(...)" macros.
-       safe_macrofiles=$(rpm $TARGET_SWITCH --showrc | awk -F: '/^macrofiles/ { gsub(/^macrofiles[ \t]+:/, "", $0); gsub(/:.*macros.build:/, ":", $0); print $0 } ')
+       safe_macrofiles=$(rpm $TARGET_SWITCH --showrc | awk -F: '/^macrofiles/ { gsub(/^macrofiles[ \t]+:/, "", $0); print $0 } ')
 
        # TODO: move these to /usr/lib/rpm/macros
        cat > $BUILDER_MACROS <<'EOF'
@@ -576,6 +603,7 @@ minirpm() {
 %releq_kernel_up(n:) ERROR
 %releq_kernel_smp(n:) ERROR
 %releq_kernel(n:) ERROR
+%py_postclean(x:) ERROR
 %kgcc_package ERROR
 %_fontsdir ERROR
 %ruby_version ERROR
@@ -821,8 +849,10 @@ init_builder() {
                        PACKAGE_DIR=$REPO_DIR/$ASSUMED_NAME
                fi
        else
-               REPO_DIR="."
-               PACKAGE_DIR="."
+               TOP_DIR=$(pwd)
+               PACKAGE_DIR=$TOP_DIR
+               REPO_DIR=$PACKAGE_DIR
+               RPMBUILDOPTS="$RPMBUILDOPTS --define '_topdir $TOP_DIR' --define '_builddir %_topdir' --define '_rpmdir %_topdir' --define '_srcrpmdir %_topdir'"
        fi
        export GIT_WORK_TREE=$PACKAGE_DIR
        export GIT_DIR=$PACKAGE_DIR/.git
@@ -877,18 +907,14 @@ get_spec() {
        fi
 
        cd "$REPO_DIR"
-       if [ ! -f "$ASSUMED_NAME/$SPECFILE" ]; then
-               # XXX: still needed?
-               SPECFILE=$(basename $SPECFILE)
-       fi
-
+       SPECFILE=$(basename $SPECFILE)
        if [ "$NOCVSSPEC" != "yes" ]; then
                if [ -z "$DEPTH" ]; then
-                       if [ -d "$ASSUMED_NAME/.git" ]; then
+                       if [ -d "$PACKAGE_DIR/.git" ]; then
                                git fetch $REMOTE_PLD || Exit_error err_no_spec_in_repo
                        elif [ "$ADD_PACKAGE_CVS" = "yes" ]; then
-                               if [ ! -r "$ASSUMED_NAME/$SPECFILE" ]; then
-                                       echo "ERROR: No package to add ($ASSUMED_NAME/$SPECFILE)" >&2
+                               if [ ! -r "$PACKAGE_DIR/$SPECFILE" ]; then
+                                       echo "ERROR: No package to add ($PACKAGE_DIR/$SPECFILE)" >&2
                                        exit 101
                                fi
                                Exit_error err_not_implemented
@@ -897,7 +923,7 @@ get_spec() {
                                        unset GIT_WORK_TREE
                                        git clone  -o $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git || {
                                                # softfail if new package, i.e not yet added to PLD rep
-                                               [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo
+                                               [ ! -f "$PACKAGE_DIR/$SPECFILE" ] && Exit_error err_no_spec_in_repo
                                                echo "Warning: package not in CVS - assuming new package"
                                                NOCVSSPEC="yes"
                                        }
@@ -906,9 +932,9 @@ get_spec() {
                                )
                        fi
                else
-                       if [ ! -d "$ASSUMED_NAME/.git" ]; then
-                               if [ ! -d "$ASSUMED_NAME" ]; then
-                                       mkdir $ASSUMED_NAME
+                       if [ ! -d "$PACKAGE_DIR/.git" ]; then
+                               if [ ! -d "$PACKAGE_DIR" ]; then
+                                       install -d $PACKAGE_DIR
                                fi
                                git init
                                git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git
@@ -932,20 +958,20 @@ get_spec() {
                # add default log format to .gitignore if it is relative to package dir
                if [ -n "$LOGFILE" -a "$LOGFILE" = "${LOGFILE##*/}" ]; then
                        # substitute known "macros" to glob
-                       local logfile=$(echo "$LOGFILE" | sed -e 's,\$\(PACKAGE_NAME\|DATE\|TARGET\),*,g')
+                       local logfile=$(echo "$LOGFILE" | sed -r -e 's,\$(PACKAGE_(NAME|VERSION|RELEASE)|DATE|TARGET),*,g')
                        if [ "$logfile" ]; then
                                cvsignore_df "$logfile"
                        fi
                fi
 
                # create symlinks for tools
-               if [ "$SYMLINK_TOOLS" != "no" -a -d "$ASSUMED_NAME" ]; then
+               if [ "$SYMLINK_TOOLS" != "no" -a -d "$PACKAGE_DIR" ]; then
                        for a in dropin md5 adapter builder {relup,compile,repackage,rsync,pearize}.sh pldnotify.awk; do
                                # skip tools that don't exist in top dir
                                [ -f $a ] || continue
                                # skip tools that already exist
-                               [ -f $ASSUMED_NAME/$a ] && continue
-                               ln -s ../$a $ASSUMED_NAME
+                               [ -f $PACKAGE_DIR/$a ] && continue
+                               ln -s ../$a $PACKAGE_DIR
                                cvsignore_df $a
                        done
                fi
@@ -967,15 +993,15 @@ get_spec() {
                fi
        fi
 
-       if [ ! -f "$ASSUMED_NAME/$SPECFILE" ]; then
+       if [ ! -f "$PACKAGE_DIR/$SPECFILE" ]; then
                Exit_error err_no_spec_in_repo
        fi
 
        if [ "$CHMOD" = "yes" -a -n "$SPECFILE" ]; then
-               chmod $CHMOD_MODE $ASSUMED_NAME/$SPECFILE
+               chmod $CHMOD_MODE $PACKAGE_DIR/$SPECFILE
        fi
        unset OPTIONS
-       [ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $ASSUMED_NAME/$SPECFILE
+       [ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $PACKAGE_DIR/$SPECFILE
 
        set_spec_target
 }
@@ -1024,15 +1050,16 @@ src_md5() {
        cd $PACKAGE_DIR
        local md5
 
-       if [ -f additional-md5sums ]; then
-               md5=$(grep -s -v '^#' additional-md5sums | \
-               grep -E "[      ]$(basename "$1")([     ,]|\$)" | \
+       # use "sources" file from package dir, like vim
+       if [ -f sources ]; then
+               md5=$(grep -s -v '^#' sources | \
+               grep -E "[      *]$(basename "$1")([    ,]|\$)" | \
                sed -e 's/^\([0-9a-f]\{32\}\).*/\1/' | \
                grep -E '^[0-9a-f]{32}$')
 
                if [ "$md5" ]; then
                        if [ $(echo "$md5" | wc -l) != 1 ] ; then
-                               echo "$SPECFILE: more then one entry in additional-md5sums for $1" 1>&2
+                               echo "$SPECFILE: more then one entry in sources for $1" 1>&2
                        fi
                        echo "$md5" | tail -n 1
                        return
@@ -1484,50 +1511,61 @@ set_version() {
        " $specfile
 }
 
+# try to upgrade .spec to new version
+# if --upgrade-version is specified, use that as new version, otherwise invoke pldnotify to find new version
+#
+# return 1: if .spec was updated
+# return 0: no changes to .spec
+# exit 1 in case of error
 try_upgrade() {
-       if [ -n "$TRY_UPGRADE" ]; then
-               local TNOTIFY TNEWVER TOLDVER
-               update_shell_title "build_package: try_upgrade"
+       if [ -z "$TRY_UPGRADE" ]; then
+               return 0
+       fi
 
-               cd "$PACKAGE_DIR"
-               
-               if [ "$UPGRADE_VERSION" ]; then
-                       TNEWVER=$UPGRADE_VERSION
-               else
-                       if [ -n "$FLOAT_VERSION" ]; then
-                               TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
-                       else
-                               TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
-                       fi
+       local TNOTIFY TNEWVER TOLDVER
+       update_shell_title "build_package: try_upgrade"
 
-                       # pldnotify.awk does not set exit codes, but it has match for ERROR
-                       # in output which means so.
-                       if [[ "$TNOTIFY" = *ERROR* ]]; then
-                               echo >&2 "$TNOTIFY"
-                               exit 1
-                       fi
+       cd "$PACKAGE_DIR"
 
-                       TNEWVER=$(echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }')
+       if [ "$UPGRADE_VERSION" ]; then
+               TNEWVER=$UPGRADE_VERSION
+               echo "Updating spec file to version $TNEWVER"
+       else
+               if [ -n "$FLOAT_VERSION" ]; then
+                       TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
+               else
+                       TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
                fi
 
-               if [ -n "$TNEWVER" ]; then
-                       TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
-                       echo "New version found, updating spec file from $TOLDVER to version $TNEWVER"
-                       if [ "$REVERT_BROKEN_UPGRADE" = "yes" ]; then
-                               cp -f $SPECFILE $SPECFILE.bak
-                       fi
-                       chmod +w $SPECFILE
-                       set_release $SPECFILE $PACKAGE_RELEASE 1
-                       set_version $SPECFILE $PACKAGE_VERSION $TNEWVER
-                       parse_spec
-                       if [ "$PACKAGE_VERSION" != "$TNEWVER" ]; then
-                               echo >&2 "Upgrading version failed, you need to update spec yourself"
-                               exit 1
-                       fi
-                       return 1
+               # pldnotify.awk does not set exit codes, but it has match for ERROR
+               # in output which means so.
+               if [[ "$TNOTIFY" = *ERROR* ]]; then
+                       echo >&2 "$TNOTIFY"
+                       exit 1
                fi
+
+               TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
+               echo "New version found, updating spec file from $TOLDVER to version $TNEWVER"
+
+               TNEWVER=$(echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }')
+       fi
+
+       if [ -z "$TNEWVER" ]; then
+               return 0
+       fi
+
+       if [ "$REVERT_BROKEN_UPGRADE" = "yes" ]; then
+               cp -f $SPECFILE $SPECFILE.bak
+       fi
+       chmod +w $SPECFILE
+       set_version $SPECFILE $PACKAGE_VERSION $TNEWVER
+       set_release $SPECFILE $PACKAGE_RELEASE 1
+       parse_spec
+       if [ "$PACKAGE_VERSION" != "$TNEWVER" ]; then
+               echo >&2 "Upgrading version failed, you need to update spec yourself"
+               exit 1
        fi
-       return 0
+       return 1
 }
 
 build_package() {
@@ -1558,36 +1596,34 @@ build_package() {
        esac
 
        update_shell_title "build_package: $COMMAND"
+       local logfile retval
        if [ -n "$LOGFILE" ]; then
-               LOG=`eval echo $LOGFILE`
-               if [ -d "$LOG" ]; then
-                       echo "Log file $LOG is a directory."
+               logfile=`eval echo $LOGFILE`
+               if [ -d "$logfile" ]; then
+                       echo "Log file $logfile is a directory."
                        echo "Parse error in the spec?"
                        Exit_error err_build_fail
                fi
                if [ -n "$LASTLOG_FILE" ]; then
-                       echo "LASTLOG=$LOG" > $LASTLOG_FILE
+                       echo "LASTLOG=$logfile" > $LASTLOG_FILE
                fi
-               RES_FILE=$(tempfile)
-               local specdir=$(insert_gitlog $SPECFILE)
-
-               (time eval PATH=$CLEAN_PATH ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE; echo $? > $RES_FILE) 2>&1 |tee $LOG
-               RETVAL=`cat $RES_FILE`
-               rm -r $RES_FILE $specdir
-               if [ -n "$LOGDIROK" ] && [ -n "$LOGDIRFAIL" ]; then
-                       if [ "$RETVAL" -eq "0" ]; then
-                               mv $LOG $LOGDIROK
-                       else
-                               mv $LOG $LOGDIRFAIL
-                       fi
+       fi
+
+       local specdir=$(insert_gitlog $SPECFILE)
+       # FIXME: eval here is exactly why?
+       PATH=$CLEAN_PATH eval teeboth "'$logfile'" ${TIME_COMMAND} ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE
+       retval=$?
+       rm -r $specdir
+
+       if [ -n "$logfile" ] && [ -n "$LOGDIROK" ] && [ -n "$LOGDIRFAIL" ]; then
+               if [ "$retval" -eq "0" ]; then
+                       mv $logfile $LOGDIROK
+               else
+                       mv $logfile $LOGDIRFAIL
                fi
-       else
-               local specdir=$(insert_gitlog $SPECFILE)
-               eval PATH=$CLEAN_PATH ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE
-               RETVAL=$?
-               rm -r $specdir
        fi
-       if [ "$RETVAL" -ne "0" ]; then
+
+       if [ "$retval" -ne "0" ]; then
                if [ -n "$TRY_UPGRADE" ]; then
                        echo "\nUpgrade package to new version failed."
                        if [ "$REVERT_BROKEN_UPGRADE" = "yes" ]; then
@@ -1728,13 +1764,13 @@ run_sub_builder() {
        package_name="${1}"
        update_shell_title "run_sub_builder $package_name"
        #
-       # No i tutaj bym chcia³ zrobiæ sztuczn± inteligencjê, która spróbuje tego
-       # pakieta zbudowaæ. Aktualnie niewiele dziala, bo generalnie nie widze do
+       # No i tutaj bym chciał zrobić sztuczną inteligencję, która spróbuje tego
+       # pakieta zbudować. Aktualnie niewiele dziala, bo generalnie nie widze do
        # konca algorytmu... Ale damy rade. :) Na razie po prostu sie wyjebie tak samo
        # jakby nie bylo tego kawalka kodu.
        #
-       # Update: Poprawi³em parê rzeczy i zaczê³o generowaæ pakiety spoza zadanej listy.
-       #         Jednym s³owem budowanie niespoldkowanych zale¿no¶ci dzia³a w paru przypadkach.
+       # Update: Poprawiłem parę rzeczy i zaczęło generować pakiety spoza zadanej listy.
+       #         Jednym słowem budowanie niespoldkowanych zależności działa w paru przypadkach.
        #
        #
        # y0shi.
@@ -2056,23 +2092,36 @@ fetch_build_requires()
                fi
 }
 
+init_repository() {
+       local remoterepo=$1
+       local localrepo=$2
+
+       if [ ! -e $localrepo ]; then
+               git clone -o $REMOTE_PLD ${GIT_SERVER}/$remoterepo $localrepo
+               git --git-dir=$localrepo/.git remote set-url --push  $REMOTE_PLD ssh://${GIT_PUSH}/$remoterepo
+       fi
+}
+
 init_rpm_dir() {
        local TOP_DIR=$(eval $RPM $RPMOPTS --eval '%{_topdir}')
        local rpmdir=$(eval $RPM $RPMOPTS --eval '%{_rpmdir}')
        local buildir=$(eval $RPM $RPMOPTS --eval '%{_builddir}')
        local srpmdir=$(eval $RPM $RPMOPTS --eval '%{_srcrpmdir}')
+       local TEMPLATES=template-specs
        local tmp
 
        echo "Initializing rpm directories to $TOP_DIR from $GIT_SERVER"
        mkdir -p $TOP_DIR $rpmdir $buildir $srpmdir
 
        cd "$TOP_DIR"
-       if [ ! -e ../rpm-build-tools ]; then
-               git clone  ${GIT_SERVER}/${PACKAGES_DIR}/rpm-build-tools.git ../rpm-build-tools
-       fi
-       for a in adapter builder fetchsrc_request; do
+       init_repository ${PACKAGES_DIR}/rpm-build-tools.git ../rpm-build-tools
+       init_repository projects/$TEMPLATES ../$TEMPLATES
+       for a in adapter builder fetchsrc_request compile repackage; do
                ln -sf ../rpm-build-tools/${a}.sh $a
        done
+       for a in md5; do
+               ln -sf ../rpm-build-tools/${a} $a
+       done
        ln -sf ../rpm-build-tools/mirrors mirrors
        init_builder
 }
@@ -2083,7 +2132,7 @@ mr_proper() {
        DONT_PRINT_REVISION="yes"
 
        # remove spec and sources
-       PATH=$CLEAN_PATH $RPMBUILD --clean --rmsource --rmspec --nodeps --define "_specdir $PACKAGE_DIR" --define "_sourcedir $PACKAGE_DIR" --define "_builddir $builddir" $PACKAGE_DIR/$SPECFILE
+       PATH=$CLEAN_PATH $RPMBUILD --clean --rmsource --rmspec --nodeps --define "__urlgetfile() %nil" --define "_specdir $PACKAGE_DIR" --define "_sourcedir $PACKAGE_DIR" --define "_builddir $builddir" $PACKAGE_DIR/$SPECFILE
        rm -rf $PACKAGE_DIR/{.git,.gitignore}
        rmdir --ignore-fail-on-non-empty $PACKAGE_DIR
 }
@@ -2209,7 +2258,7 @@ while [ $# -gt 0 ]; do
                -pm | --prefer-mirrors )
                        PREFMIRRORS="yes"
                        shift;;
-               --no-init )
+               --noinit | --no-init )
                        NOINIT="yes"
                        shift;;
                --opts )
@@ -2426,6 +2475,9 @@ else
        NICE_COMMAND="nice -n ${DEF_NICE_LEVEL}"
 fi
 
+# see time(1) for output format that could be used
+TIME_COMMAND="time -p"
+
 update_shell_title "$COMMAND"
 case "$COMMAND" in
        "show_bconds")
@@ -2540,7 +2592,7 @@ case "$COMMAND" in
                case $? in
                        0)
                                get_files $SOURCES $PATCHES
-                               check_md5 $SOURCES
+                               check_md5 $SOURCES $PATCHES
                                ;;
                        *)
                                NODIST="yes" get_files $SOURCES $PATCHES
@@ -2644,13 +2696,13 @@ case "$COMMAND" in
                done
                ;;
        "list-sources-urls" )
-               init_builder
+               init_builder >&2
                NOCVSSPEC="yes"
                DONT_PRINT_REVISION="yes"
-               get_spec
-               parse_spec
+               get_spec >&2
+               parse_spec >&2
                SAPS="$SOURCES $PATCHES"
-               for SAP in $SAPS ; do
+               for SAP in $SAPS; do
                        echo $SAP
                done
                ;;
This page took 0.074557 seconds and 4 git commands to generate.