]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- tagging speedup (tag SOURCES at once)
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 22 May 2006 21:39:21 +0000 (21:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.432

builder.sh

index 414cee859c39c10553768fcdb381b43c3bdae1b5..94c719f3171a56040d4791108ce211243a407028 100644 (file)
@@ -670,7 +670,7 @@ src_md5()
                # we have empty SourceX-md5, but it is still possible
                # that we have NoSourceX-md5 AND NoSource: X
                nosource_md5=`grep -i "#[        ]*NoSource$no-md5[      ]*:" $SPECFILE | sed -e 's/.*://'`
-               if [ ! -z "$nosource_md5" -a -n "`grep -i "^NoSource:[   ]*$no$" $SPECFILE`" ] ; then
+               if [ -n "$nosource_md5" -a -n "`grep -i "^NoSource:[     ]*$no$" $SPECFILE`" ] ; then
                        echo $nosource_md5
                fi
        fi
@@ -970,7 +970,7 @@ tag_files()
                set -v;
        fi
 
-       if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
+       if [ $# -gt 0 ]; then
                echo "Version: $PACKAGE_VERSION"
                echo "Release: $PACKAGE_RELEASE"
 
@@ -983,37 +983,44 @@ tag_files()
                        echo "CVS tag: $TAG"
                fi
 
-               OPTIONS="tag -F"
+               local OPTIONS="tag -F"
                if [ -n "$CVSROOT" ]; then
                        OPTIONS="-d $CVSROOT $OPTIONS"
                fi
 
                cd "$SOURCE_DIR"
-               for i in $TAG_FILES
-               do
+               local tag_files
+               for i in $TAG_FILES; do
                        # don't tag files stored on distfiles
                        [ -n "`src_md5 $i`" ] && continue
-                       if [ -f "`nourl $i`" ]; then
-                               if [ "$TAG_VERSION" = "yes" ]; then
-                                       cvs $OPTIONS $TAGVER `nourl $i`
-                               fi
-                               if [ -n "$TAG" ]; then
-                                       cvs $OPTIONS $TAG `nourl $i`
-                               fi
+                       local fp=`nourl "$i"`
+                       if [ -f "$fp" ]; then
+                               tag_files="$tag_files $fp"
                        else
                                Exit_error err_no_source_in_repo $i
                        fi
                done
 
+               if [ "$tag_files" ]; then
+                       if [ "$TAG_VERSION" = "yes" ]; then
+                               update_shell_title "tag sources: $TAGVER"
+                               cvs $OPTIONS $TAGVER $tag_files
+                       fi
+                       if [ -n "$TAG" ]; then
+                               update_shell_title "tag sources: $TAG"
+                               cvs $OPTIONS $TAG $tag_files
+                       fi
+               fi
+
                cd "$SPECS_DIR"
                if [ "$TAG_VERSION" = "yes" ]; then
+                       update_shell_title "tag spec: $TAGVER"
                        cvs $OPTIONS $TAGVER $SPECFILE
                fi
                if [ -n "$TAG" ]; then
+                       update_shell_title "tag spec: $TAG"
                        cvs $OPTIONS $TAG $SPECFILE
                fi
-
-               unset OPTIONS
        fi
 }
 
This page took 0.04231 seconds and 4 git commands to generate.