[csw-devel] SF.net SVN: gar:[2501] csw/mgar/gar/v2

bonivart at users.sourceforge.net bonivart at users.sourceforge.net
Tue Dec 9 21:39:16 CET 2008


Revision: 2501
          http://gar.svn.sourceforge.net/gar/?rev=2501&view=rev
Author:   bonivart
Date:     2008-12-09 20:39:16 +0000 (Tue, 09 Dec 2008)

Log Message:
-----------
mGAR v2: Allow /etc and /var in packages by default

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

Modified: csw/mgar/gar/v2/bin/cswproto
===================================================================
--- csw/mgar/gar/v2/bin/cswproto	2008-12-09 20:23:44 UTC (rev 2500)
+++ csw/mgar/gar/v2/bin/cswproto	2008-12-09 20:39:16 UTC (rev 2501)
@@ -20,7 +20,7 @@
 use POSIX;
 
 use vars qw/
-    @XPATS @XFORMS @Common $StdOwn $StdGrp $StdDirPerm $stamp $root
+    @XFORMS @Common $StdOwn $StdGrp $StdDirPerm $stamp $root
     /;
 
 # atime=8,mtime=9,ctime=10
@@ -38,15 +38,6 @@
     [ qr{^/opt/csw/info$}, q{/opt/csw/share/info} ],
 );
 
-# Standard exclusions
- at XPATS = (
-    qr{^/$},
-    qr{^/opt$},
-    qr{^/opt/csw$},
-    qr{perllocal\.pod},
-    qr{~$},
-);
-
 # Print usage information and exit
 sub usage {
     print join(" ", @_) if @_;
@@ -77,7 +68,7 @@
 sub is_common {
     my $path = shift;
     foreach my $pat (@Common) {
-        return 1 if $path =~ /$pat$/;
+        return 1 if $path =~ m!^$pat$!;
     }
     return 0;
 }
@@ -156,7 +147,7 @@
         next unless $F[2];
 
         # Then process any excludes
-        foreach my $pattern (@XPATS) { next SPECLINE if $F[2] =~ $pattern   }
+	next SPECLINE if( is_common( $F[2] ) );
         next if exclude($realpath);
 
         # Fix up dir permissions/file ownership.
@@ -172,6 +163,10 @@
 
 # Common directories (CSWcommon plus a few others)
 __DATA__
+/etc
+/etc/opt
+/etc/opt/csw
+/opt
 /opt/csw
 /opt/csw/bin
 /opt/csw/bin/i386
@@ -348,3 +343,6 @@
 /opt/csw/share/perl/csw/auto
 /opt/csw/share/perl/site_perl
 /opt/csw/var
+/var
+/var/opt
+/var/opt/csw

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2008-12-09 20:23:44 UTC (rev 2500)
+++ csw/mgar/gar/v2/gar.pkg.mk	2008-12-09 20:39:16 UTC (rev 2501)
@@ -140,7 +140,7 @@
 
 # Pulled in from pkglib/csw_prototype.gspec
 $(PROTOTYPE): $(WORKDIR) merge
-	@cswproto -r $(PKGROOT) $(PKGROOT)$(prefix) >$@
+	@cswproto -r $(PKGROOT) $(PKGROOT) >$@
 
 .PRECIOUS: $(WORKDIR)/%.prototype $(WORKDIR)/%.prototype-$(GARCH)
 $(WORKDIR)/%.prototype: | $(PROTOTYPE)


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