[csw-devel] SF.net SVN: gar:[4915] csw/mgar/gar/v2/gar.pkg.mk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sun May 17 17:22:50 CEST 2009


Revision: 4915
          http://gar.svn.sourceforge.net/gar/?rev=4915&view=rev
Author:   dmichelsen
Date:     2009-05-17 15:22:50 +0000 (Sun, 17 May 2009)

Log Message:
-----------
mGAR v2: Interim-commit for hardlink reordeing matching package dependencies

Modified Paths:
--------------
    csw/mgar/gar/v2/gar.pkg.mk

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2009-05-17 12:46:10 UTC (rev 4914)
+++ csw/mgar/gar/v2/gar.pkg.mk	2009-05-17 15:22:50 UTC (rev 4915)
@@ -218,6 +218,27 @@
 )
 endef
 
+# This function takes a full path to a filename and returns the package it belongs to.
+# The package may be generated during this build or already installed on the system.
+# /etc/crypto/certs/SUNWObjectCA=../../../etc/certs/SUNWObjectCA l none SUNWcsr
+#perl -ane '$$f=quotemeta("$1");if($$F[0]=~/^$$f(=.*)?$$/){print join(" ",$$F[3..$$#F]),"\n";exit}'</var/sadm/install/contents
+#$(shell /usr/sbin/pkgchk -l -p $1 2>/dev/null | awk '/^Current/ {p=0} p==1 {print} /^Referenced/ {p=1}' | perl -ane 'print join("\n", at F)')
+# 'pkchk -l -p' doesn't work as it concatenates package names with more than 14 characters,
+# e. g. SUNWgnome-base-libs-develSUNWgnome-calculatorSUNWgnome-freedb-libsSUNWgnome-cd-burnerSUNWgnome-character-map
+define file2pkg
+$(shell perl -ane '@l{"s","l","d","b","c","f","x","v","e"}=(3,3,6,8,8,9,6,9,9);$$f=quotemeta("$1");if($$F[0]=~/^$$f(=.*)?$$/){s/^\*// foreach @F;print join(" ", at F[$$l{$$F[1]}..$$#F]),"\n";exit}'</var/sadm/install/contents)
+endef
+
+define linktargets
+$(shell perl -ane 'if($$F[0] eq "l" && $$F[2]=~/=(.*)$$/){print $$1,"\n"}'<$1)
+endef
+
+_test-file2pkg:
+	@echo $(call file2pkg,/etc)
+
+_test-linktargets:
+	@echo $(call linktargets,work/build-global/CSWlinkbase.prototype)
+
 #
 # Targets
 #


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list