]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Rewrite get_spec with git
authorKacper Kornet <draenog@pld-linux.org>
Mon, 21 Mar 2011 17:39:28 +0000 (17:39 +0000)
committerKacper Kornet <draenog@pld-linux.org>
Mon, 28 Mar 2011 12:29:05 +0000 (13:29 +0100)
builder.sh

index 9f9c9447f726f8fcd8370f4c1ea3bfb54fa712d8..eaadba3345094fb501c99e7bcbe7fe21b9a158a3 100755 (executable)
@@ -745,33 +745,22 @@ get_spec() {
        fi
 
        if [ "$NOCVSSPEC" != "yes" ]; then
-               if [ ! -s CVS/Root -a "$NOCVSSPEC" != "yes" ]; then
-                       echo "Warning: No CVS access defined - using local .spec file"
-                       NOCVSSPEC="yes"
-               fi
-
-               if [ -d "$ASSUMED_NAME" -a -s "$ASSUMED_NAME/CVS/Root" ]; then
-                       cvsup "$ASSUMED_NAME/$SPECFILE" || Exit_error err_no_spec_in_repo
+               if [ -d "$ASSUMED_NAME/.git" ]; then
+                       GIT_DIR=$PACKAGE_DIR/.git git pull  || 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
                                exit 101
                        fi
-                       if [ ! -s "$ASSUMED_NAME/CVS/Root" ]; then
-                               cvsup -a $ASSUMED_NAME || Exit_error err_cvs_add_failed
-                       fi
-                       cvsup -a "$ASSUMED_NAME/$SPECFILE" || Exit_error err_cvs_add_failed
+                       Exit_error err_not_implemented
                else
-                       cvsup -c -d $ASSUMED_NAME "packages/$ASSUMED_NAME/$SPECFILE" || {
+                       git clone  ${GIT_SERVER}/${ASSUMED_NAME}.git || {
                                # softfail if new package, i.e not yet added to cvs
                                [ ! -f "$ASSUMED_NAME/$SPECFILE" ] && Exit_error err_no_spec_in_repo
                                echo "Warning: package not in CVS - assuming new package"
                                NOCVSSPEC="yes"
                                NOCVS="yes"
                        }
-
-                       # remove Entries.Static -- so 'cvs up' would update all files in a repo
-                       rm -f "$ASSUMED_NAME/CVS/Entries.Static"
                fi
 
                cvsignore_df .cvsignore
This page took 0.055767 seconds and 4 git commands to generate.