Author: shadzik                      Date: Sat Aug 25 11:24:12 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- a nice idea to get maltagged sources from HEAD
- use --use-greed-sources to do that
- all by Krzysztof 'dirdival' Goli�ski <krzysztof dot golinski [at] gmail dot 
com>

---- Files affected:
SPECS:
   builder (1.511 -> 1.512) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.511 SPECS/builder:1.512
--- SPECS/builder:1.511 Wed Aug 22 00:06:11 2007
+++ SPECS/builder       Sat Aug 25 13:24:07 2007
@@ -48,6 +48,7 @@
 NO5=""
 ALWAYS_CVSUP=${ALWAYS_CVSUP:-"yes"}
 CVSROOT=""
+GREEDSRC=""
 
 # user agent when fetching files
 USER_AGENT="PLD/Builder($VERSION)"
@@ -1036,7 +1037,11 @@
 
                        # the md5 check must be moved elsewhere as if we've 
called from update_md5 the md5 is wrong.
                        if [ ! -f "$fp" -a "$FAIL_IF_NO_SOURCES" != "no" ]; then
-                               Exit_error err_no_source_in_repo $i
+                               if [ -n "GREEDSRC" ]; then
+                                       get_greed_sources $i
+                               else
+                                       Exit_error err_no_source_in_repo $i
+                               fi
                        fi
 
                        # we check md5 here just only to refetch immediately
@@ -1140,6 +1145,8 @@
                local fp=`nourl "$i"`
                if [ -f "$fp" ]; then
                        tag_files="$tag_files $fp"
+               elif [ -n "GREEDSRC" ]; then
+                       get_greed_sources $i
                else
                        Exit_error err_no_source_in_repo $i
                fi
@@ -1190,6 +1197,8 @@
                local fp=`nourl "$i"`
                if [ -f "$fp" ]; then
                        tag_files="$tag_files $fp"
+               elif [ -n "GREEDSRC" ]; then
+                       get_greed_sources $i
                else
                        Exit_error err_no_source_in_repo $i
                fi
@@ -1828,6 +1837,18 @@
        echo "- edit $SOURCE_DIR/CVS/Root"
 }
 
+get_greed_sources() {
+       CVSROOT=":pserver:[EMAIL PROTECTED]:/cvsroot"
+       if [ -n "BE_VERBOSE" ]; then
+               echo "Try greed download: $1 from: $CVSROOT"
+       fi
+       cvs -d $CVSROOT get SOURCES/$1
+       if [ $? != 0 ]; then
+               Exit_error err_no_source_in_repo $1
+       fi
+       
+}
+
 #---------------------------------------------
 # main()
 
@@ -2033,6 +2054,9 @@
                --init-rpm-dir)
                        COMMAND="init_rpm_dir"
                        shift ;;
+               --use-greed-sources )
+                       GREEDSRC="1"
+                       shift;;
                -u | --try-upgrade )
                        TRY_UPGRADE="1"; shift ;;
                -un | --try-upgrade-with-float-version )
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/builder?r1=1.511&r2=1.512&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to