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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Aug 14 22:04:26 CEST 2010


Revision: 10738
          http://gar.svn.sourceforge.net/gar/?rev=10738&view=rev
Author:   wahwah
Date:     2010-08-14 20:04:26 +0000 (Sat, 14 Aug 2010)

Log Message:
-----------
mGAR v2: merging in the checkpkg overrride file location change.

Modified Paths:
--------------
    csw/mgar/gar/v2/gar.conf.mk
    csw/mgar/gar/v2/gar.pkg.mk
    csw/mgar/gar/v2/lib/python/opencsw.py

Property Changed:
----------------
    csw/mgar/gar/v2/
    csw/mgar/gar/v2/pkglib/csw/depend


Property changes on: csw/mgar/gar/v2
___________________________________________________________________
Modified: svn:mergeinfo
   - /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-bwalton:9784-10011
/csw/mgar/gar/v2-checkpkg:7722-7855
/csw/mgar/gar/v2-checkpkg-stats:8454-8649
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-dirpackage:8125-8180
/csw/mgar/gar/v2-migrateconf:7082-7211
/csw/mgar/gar/v2-skayser:6087-6132
/csw/mgar/gar/v2-sqlite:10434-10449
   + /csw/mgar/gar/v2:4936-6678
/csw/mgar/gar/v2-bwalton:9784-10011
/csw/mgar/gar/v2-checkpkg:7722-7855
/csw/mgar/gar/v2-checkpkg-override-relocation:10585-10737
/csw/mgar/gar/v2-checkpkg-stats:8454-8649
/csw/mgar/gar/v2-collapsed-modulations:6895
/csw/mgar/gar/v2-dirpackage:8125-8180
/csw/mgar/gar/v2-migrateconf:7082-7211
/csw/mgar/gar/v2-skayser:6087-6132
/csw/mgar/gar/v2-sqlite:10434-10449

Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk	2010-08-14 19:50:59 UTC (rev 10737)
+++ csw/mgar/gar/v2/gar.conf.mk	2010-08-14 20:04:26 UTC (rev 10738)
@@ -31,6 +31,7 @@
 WORKROOTDIR ?= $(if $(GAR_PLATFORM),work/$(GAR_PLATFORM),work)
 WORKDIR ?= $(WORKROOTDIR)/build-$(MODULATION)
 WORKDIR_FIRSTMOD ?= $(WORKROOTDIR)/build-$(firstword $(MODULATIONS))
+WORKDIR_GLOBAL ?= $(WORKROOTDIR)/build-global
 DOWNLOADDIR ?= $(WORKROOTDIR)/download
 PARTIALDIR ?= $(DOWNLOADDIR)/partial
 COOKIEROOTDIR ?= $(WORKROOTDIR)/cookies
@@ -492,7 +493,7 @@
  SOS12U1_AS_FLAGS ?= $(EXTRA_SOS12U1_AS_FLAGS) $(EXTRA_SOS_AS_FLAGS) $(EXTRA_AS_FLAGS)
     GCC3_LD_FLAGS ?= -L$(GCC3_CC_HOME)/lib/$(MM_LIBDIR) $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_GCC3_LD_FLAGS) $(EXTRA_GCC_LD_FLAGS) $(EXTRA_LD_FLAGS)
     GCC4_LD_FLAGS ?= -L$(GCC4_CC_HOME)/lib/$(MM_LIBDIR) $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_GCC4_LD_FLAGS) $(EXTRA_GCC_LD_FLAGS) $(EXTRA_LD_FLAGS)
-   SOS11_LD_FLAGS ?= $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_SOS11_LD_FLAGS) $(EXTRA_SOS_LD_FLAGS) $(EXTRA_LD_FLAGS) -norunpath
+   SOS11_LD_FLAGS ?= $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_SOS11_LD_FLAGS) $(EXTRA_SOS_LD_FLAGS) $(EXTRA_LD_FLAGS) -norunpath -xnorunpath
    SOS12_LD_FLAGS ?= $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_SOS12_LD_FLAGS) $(EXTRA_SOS_LD_FLAGS) $(EXTRA_LD_FLAGS) -norunpath
  SOS12U1_LD_FLAGS ?= $(ARCHFLAGS_$(GARCOMPILER)_$(ISA)) $(EXTRA_SOS12U1_LD_FLAGS) $(EXTRA_SOS_LD_FLAGS) $(EXTRA_LD_FLAGS) -norunpath
 

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2010-08-14 19:50:59 UTC (rev 10737)
+++ csw/mgar/gar/v2/gar.pkg.mk	2010-08-14 20:04:26 UTC (rev 10738)
@@ -366,7 +366,10 @@
 		$$F[1] = "cswalternatives" if( $$F[2] =~ m,^/opt/csw/share/alternatives/[^/]+$$, );\
                 print join(" ", at F),"\n";'
 
+_PROTOTYPE_MODIFIERS += | ( cat; \
+		$(foreach SPEC,$(_PKG_SPECS),if test -f "$(WORKDIR_GLOBAL)/checkpkg_override.$(SPEC)";then echo "i checkpkg_override=checkpkg_override.$(SPEC)"; fi;))
 
+
 # This file contains all installed pathes. This can be used as a starting point
 # for distributing files to individual packages.
 PROTOTYPE = $(WORKDIR)/prototype
@@ -682,7 +685,7 @@
 	$(_DBG)ginstall -d $(PKGROOT)/opt/csw/share/checkpkg/overrides
 	$(_DBG)($(foreach O,$(or $(CHECKPKG_OVERRIDES_$*),$(CHECKPKG_OVERRIDES)) $(_CATEGORY_CHECKPKG_OVERRIDES),echo "$O";)) | \
 		perl -F'\|' -ane 'unshift @F,"$*"; $$F[0].=":"; print join(" ", at F );' \
-		> $(PKGROOT)/opt/csw/share/checkpkg/overrides/$(call catalogname,$*)
+		> $(WORKDIR_GLOBAL)/checkpkg_override.$*
 	@$(MAKECOOKIE)
 
 merge-checkpkgoverrides: $(foreach S,$(SPKG_SPECS),$(if $(or $(CHECKPKG_OVERRIDES_$S),$(CHECKPKG_OVERRIDES),$(_CATEGORY_CHECKPKG_OVERRIDES)),merge-checkpkgoverrides-$S))

Modified: csw/mgar/gar/v2/lib/python/opencsw.py
===================================================================
--- csw/mgar/gar/v2/lib/python/opencsw.py	2010-08-14 19:50:59 UTC (rev 10737)
+++ csw/mgar/gar/v2/lib/python/opencsw.py	2010-08-14 20:04:26 UTC (rev 10738)
@@ -917,17 +917,18 @@
         self.file_paths.extend([f.replace(remove_prefix, "") for f in full_paths])
     return self.file_paths
 
-  def _GetOverridesStream(self):
-    catalogname = self.GetCatalogname()
-    file_path = os.path.join(self.directory,
-                             "root",
-                             "opt/csw/share/checkpkg/overrides",
-                             catalogname)
+  def _GetOverridesStream(self, file_path):
     # This might potentially cause a file descriptor leak, but I'm not going to
     # worry about that at this stage.
+    # NB, the whole catalog run doesn't seem to be suffering. (~2500 packages)
+    #
+    # There is a race condition here, but it's executing sequentially, I don't
+    # expect any concurrency problems.
     if os.path.isfile(file_path):
+      logging.debug("Opening %s override file." % repr(file_path))
       return open(file_path, "r")
     else:
+      logging.debug("Override file %s not found." % repr(file_path))
       return None
 
   def _ParseOverridesStream(self, stream):
@@ -940,11 +941,22 @@
 
   def GetOverrides(self):
     """Returns overrides, a list of overrides.Override instances."""
-    stream = self._GetOverridesStream()
-    if stream:
-      return self._ParseOverridesStream(stream)
-    else:
-      return list()
+    overrides = []
+    catalogname = self.GetCatalogname()
+    override_paths = (
+        [self.directory,
+         "root",
+         "opt/csw/share/checkpkg/overrides", catalogname],
+        [self.directory,
+         "install",
+         "checkpkg_override"],
+    )
+    for override_path in override_paths:
+      file_path = os.path.join(*override_path)
+      stream = self._GetOverridesStream(file_path)
+      if stream:
+        overrides.extend(self._ParseOverridesStream(stream))
+    return overrides
 
   def GetFileContent(self, pkg_file_path):
     if pkg_file_path.startswith("/"):


Property changes on: csw/mgar/gar/v2/pkglib/csw/depend
___________________________________________________________________
Modified: svn:mergeinfo
   - /csw/mgar/gar/v2/pkglib/csw/depend:4936-6678
/csw/mgar/gar/v2-bwalton/pkglib/csw/depend:9784-10011
/csw/mgar/gar/v2-checkpkg/pkglib/csw/depend:7722-7855
/csw/mgar/gar/v2-checkpkg-stats/pkglib/csw/depend:8454-8649
/csw/mgar/gar/v2-collapsed-modulations/pkglib/csw/depend:6895
/csw/mgar/gar/v2-dirpackage/pkglib/csw/depend:8125-8180
/csw/mgar/gar/v2-skayser/pkglib/csw/depend:6087-6132
/csw/mgar/gar/v2-sqlite/pkglib/csw/depend:10434-10449
   + /csw/mgar/gar/v2/pkglib/csw/depend:4936-6678
/csw/mgar/gar/v2-bwalton/pkglib/csw/depend:9784-10011
/csw/mgar/gar/v2-checkpkg/pkglib/csw/depend:7722-7855
/csw/mgar/gar/v2-checkpkg-override-relocation/pkglib/csw/depend:10585-10737
/csw/mgar/gar/v2-checkpkg-stats/pkglib/csw/depend:8454-8649
/csw/mgar/gar/v2-collapsed-modulations/pkglib/csw/depend:6895
/csw/mgar/gar/v2-dirpackage/pkglib/csw/depend:8125-8180
/csw/mgar/gar/v2-skayser/pkglib/csw/depend:6087-6132
/csw/mgar/gar/v2-sqlite/pkglib/csw/depend:10434-10449


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