SPECS: adapter.awk - no longer standalone

glen glen at pld-linux.org
Mon Oct 27 23:35:11 CET 2008


Author: glen                         Date: Mon Oct 27 22:35:11 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- no longer standalone

---- Files affected:
SPECS:
   adapter.awk (1.412 -> 1.413) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.412 SPECS/adapter.awk:1.413
--- SPECS/adapter.awk:1.412	Mon Oct 27 22:25:33 2008
+++ SPECS/adapter.awk	Mon Oct 27 23:35:06 2008
@@ -1745,13 +1745,19 @@
 # Load rpm macros
 # you should update the list also in adapter when making changes here
 function import_rpm_macros() {
+	# File with rpm groups
+	sourcedir = ENVIRON["_sourcedir"]
+
+	if (!sourcedir) {
+		print "adapter.awk should not not be invoked directly, but via adapter script" > "/dev/stderr"
+		do_not_touch_anything = 1
+		exit(1);
+	}
+
 	# get cvsaddress for changelog section
 	# using rpm macros as too lazy to add ~/.adapterrc parsing support.
 	_cvsmaildomain = ENVIRON["_cvsmaildomain"]
 	_cvsmailfeedback = ENVIRON["_cvsmailfeedback"]
-
-	# File with rpm groups
-	sourcedir = ENVIRON["_sourcedir"]
 
 	prefix = ENVIRON["_prefix"]
 	bindir = ENVIRON["_bindir"]
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/adapter.awk?r1=1.412&r2=1.413&f=u



More information about the pld-cvs-commit mailing list