SPECS: builder - added -ni (--no-init) option to not initialize ...

baggins baggins at pld-linux.org
Tue Apr 25 16:09:42 CEST 2006


Author: baggins                      Date: Tue Apr 25 14:09:42 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added -ni (--no-init) option to not initialize
  (set them to .) SPECS_DIR and SOURCES_DIR

---- Files affected:
SPECS:
   builder (1.415 -> 1.416) 

---- Diffs:

================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.415 SPECS/builder:1.416
--- SPECS/builder:1.415	Tue Apr 25 15:47:31 2006
+++ SPECS/builder	Tue Apr 25 16:09:37 2006
@@ -242,6 +242,7 @@
 -ns, --no-srcs      - don't download Sources
 -ns0, --no-source0  - don't download Source0
 -nn, --no-net       - don't download anything from the net
+-ni, --no-init      - don't initialize builder paths (SPECS and SOURCES)
 -ske,
 --skip-existing-files - skip existing files in get_files
 --opts <rpm opts>   - additional options for rpm
@@ -437,7 +438,7 @@
 		return
 	fi
 
-	rpm_dump_cache="böö" NODIST="yes" UPDATE5= get_files $ICONS
+	rpm_dump_cache="böö" "NODIST="yes" UPDATE5= get_files $ICONS
 }
 
 parse_spec()
@@ -543,8 +544,13 @@
 		set -v;
 	fi
 
-	SOURCE_DIR="`eval $RPM $RPMOPTS --eval '%{_sourcedir}'`"
-	SPECS_DIR="`eval $RPM $RPMOPTS --eval '%{_specdir}'`"
+	[ "$NOINIT" != "yes" ] ; then
+		SOURCE_DIR="`eval $RPM $RPMOPTS --eval '%{_sourcedir}'`"
+		SPECS_DIR="`eval $RPM $RPMOPTS --eval '%{_specdir}'`"
+	else
+		SOURCE_DIR="."
+		SPECS_DIR="."
+	fi
 
 	__PWD="`pwd`"
 }
@@ -1698,6 +1704,9 @@
 			NOURLS="yes"
 			NOSRCS="yes"
 			ALWAYS_CVSUP="no"
+			shift;;
+		-ni | --no-init )
+			NOINIT="yes"
 			shift;;
 		--opts )
 			shift; RPMOPTS="$RPM_OPTS ${1}"; shift ;;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/builder?r1=1.415&r2=1.416&f=u



More information about the pld-cvs-commit mailing list