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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Tue Feb 22 14:33:46 CET 2011


Revision: 13441
          http://gar.svn.sourceforge.net/gar/?rev=13441&view=rev
Author:   dmichelsen
Date:     2011-02-22 13:33:46 +0000 (Tue, 22 Feb 2011)

Log Message:
-----------
mGAR v2: Limit length of obsolete package descriptions to 100 chars and rename from obsoleted-by to obsolete

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

Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk	2011-02-22 10:17:11 UTC (rev 13440)
+++ csw/mgar/gar/v2/gar.mk	2011-02-22 13:33:46 UTC (rev 13441)
@@ -803,7 +803,7 @@
 
 
 # The basic merge merges the compiles for all ISAs on the current architecture
-merge: checksum pre-merge merge-do merge-license merge-classutils merge-checkpkgoverrides merge-alternatives $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) merge-README.CSW merge-obsoleted-by $(if $(AP2_MODS),post-merge-ap2mod) post-merge
+merge: checksum pre-merge merge-do merge-license merge-classutils merge-checkpkgoverrides merge-alternatives $(if $(COMPILE_ELISP),compile-elisp) $(if $(NOSOURCEPACKAGE),,merge-src) merge-README.CSW merge-obsolete $(if $(AP2_MODS),post-merge-ap2mod) post-merge
 	banner merge
 	@$(MAKECOOKIE)
 
@@ -887,7 +887,7 @@
 .PHONY: remerge reset-merge reset-merge-modulated
 remerge: reset-merge merge
 
-reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-classutils reset-merge-checkpkgoverrides reset-merge-alternatives reset-merge-README.CSW reset-merge-obsoleted-by reset-merge-ap2mod reset-merge-src
+reset-merge: reset-package $(addprefix reset-merge-,$(MODULATIONS)) reset-merge-license reset-merge-classutils reset-merge-checkpkgoverrides reset-merge-alternatives reset-merge-README.CSW reset-merge-obsolete reset-merge-ap2mod reset-merge-src
 	@rm -f $(COOKIEDIR)/pre-merge $(foreach M,$(MODULATIONS),$(COOKIEDIR)/merge-$M) $(COOKIEDIR)/merge $(COOKIEDIR)/post-merge
 	@rm -rf $(PKGROOT)
 

Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk	2011-02-22 10:17:11 UTC (rev 13440)
+++ csw/mgar/gar/v2/gar.pkg.mk	2011-02-22 13:33:46 UTC (rev 13441)
@@ -57,7 +57,8 @@
 
 define obsoleted_pkg
 CATALOGNAME_$(1) = $(call catalogname,$(1))
-SPKG_DESC_$(1) = Transitional package as contents moved to $(foreach P,$(PACKAGES),$(if $(filter $(1),$(OBSOLETES_$P)),$P))
+# The length of the description has been limited to 100 characters, the string is cut only on word boundaries
+SPKG_DESC_$(1) ?= $(shell echo Transitional package as contents moved to $(foreach P,$(PACKAGES),$(if $(filter $(1),$(OBSOLETES_$P)),$P)) | perl -npe 's/^(.{0,96})\s.+/$$1 .../')
 RUNTIME_DEP_PKGS_$(1) = $(foreach P,$(PACKAGES),$(if $(filter $(1),$(OBSOLETES_$P)),$P))
 PKGFILES_$(1) = NOFILES
 ARCHALL_$(1) = 1
@@ -411,7 +412,7 @@
 endef
 
 define obsoleted_filter
-  | ( cat; if test -f "$(WORKDIR_GLOBAL)/$(1).obsoleted-by";then echo "i obsoleted-by=$(1).obsoleted-by"; fi)
+  | ( cat; if test -f "$(WORKDIR_GLOBAL)/$(1).obsolete";then echo "i obsolete=$(1).obsolete"; fi)
 endef
 
 # This file contains all installed pathes. This can be used as a starting point
@@ -685,18 +686,18 @@
 reset-merge-README.CSW:
 	$(_DBG)rm -f $(COOKIEDIR)/merge-README.CSW $(foreach SPEC,$(_PKG_SPECS),$(PKGROOT)$(docdir)/$(call catalogname,$(SPEC))/README.CSW)
 
-merge-obsoleted-by: $(WORKDIR_GLOBAL)
+merge-obsolete: $(WORKDIR_GLOBAL)
 	$(_DBG)$(foreach P,$(OBSOLETED_PKGS),$(foreach Q,$(PACKAGES),$(if $(filter $P,$(OBSOLETES_$Q)), \
 		$(if $(SPKG_DESC_$Q), \
-			echo "$Q $(call catalogname,$Q) - $(SPKG_DESC_$Q)" >> $(WORKDIR_GLOBAL)/$P.obsoleted-by;, \
-			echo "$(shell (/usr/bin/pkginfo $Q || echo "$Q - ") | $(GAWK) '{ $$1 = "P"; print } ')" $(WORKDIR_GLOBAL)/$P.obsoleted-by; \
+			echo "$Q $(call catalogname,$Q) - $(SPKG_DESC_$Q)" >> $(WORKDIR_GLOBAL)/$P.obsolete;, \
+			echo "$(shell (/usr/bin/pkginfo $Q || echo "$Q - ") | $(GAWK) '{ $$1 = "P"; print } ')" $(WORKDIR_GLOBAL)/$P.obsolete; \
 		) \
 	)))
 	@$(MAKECOOKIE)
 
-.PHONY: reset-merge-obsoleted-by
-reset-merge-obsoleted-by:
-	$(_DBG)rm -f $(COOKIEDIR)/merge-obsoleted-by $(WORKDIR_GLOBAL)/obsoleted-by.*
+.PHONY: reset-merge-obsolete
+reset-merge-obsolete:
+	$(_DBG)rm -f $(COOKIEDIR)/merge-obsolete $(WORKDIR_GLOBAL)/.*.obsolete
 
 merge-classutils: merge-migrateconf merge-usergroup merge-inetdconf merge-etcservices
 


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