[csw-devel] [PATCH] Fix SPKG_DESC duplicate checking
Maciej Blizinski
maciej at opencsw.org
Mon Aug 1 18:15:57 CEST 2011
Works around ticket #56.
http://sourceforge.net/apps/trac/gar/ticket/56
Previous attempt at fixing it:
http://sourceforge.net/apps/trac/gar/changeset/11424
---
gar/v2/gar.pkg.mk | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gar/v2/gar.pkg.mk b/gar/v2/gar.pkg.mk
index 41495e0..6419b54 100644
--- a/gar/v2/gar.pkg.mk
+++ b/gar/v2/gar.pkg.mk
@@ -640,9 +640,16 @@ $(if $(filter-out $(firstword $(SPKG_SPECS)),$(SPKG_SPECS)),\
$(foreach P,$(SPKG_SPECS),\
$(if $(SPKG_DESC_$(P)),,$(error Multiple packages defined and SPKG_DESC_$(P) is not set.))))
+# There was a bug here.
+# http://sourceforge.net/apps/trac/gar/ticket/56
+# The workaround was to add an additional check whether the strings are the
+# same or not.
$(foreach P,$(SPKG_SPECS),\
$(foreach Q,$(filter-out $(P) $(OBSOLETED_PKGS),$(SPKG_SPECS)),\
- $(if $(filter-out $(subst ,_,$(SPKG_DESC_$(P))),$(subst ,_,$(SPKG_DESC_$(Q)))),,$(error The package descriptions for $(P) [$(if $(SPKG_DESC_$(P)),$(SPKG_DESC_$(P)),<not set>)] and $(Q) [$(if $(SPKG_DESC_$(Q)),$(SPKG_DESC_$(Q)),<not set>)] are identical. Please make sure that all descriptions are unique by setting SPKG_DESC_<pkg> for each package.))))
+ $(if $(filter-out $(subst ,_,$(SPKG_DESC_$(P))),$(subst ,_,$(SPKG_DESC_$(Q)))),\
+ ,\
+ $(if $(shell if [ "$(SPKG_DESC_$(P))" = "$(SPKG_DESC_$(Q))" ]; then echo bad; fi),\
+ $(error The package descriptions for $(P) [$(if $(SPKG_DESC_$(P)),$(SPKG_DESC_$(P)),<not set>)] and $(Q) [$(if $(SPKG_DESC_$(Q)),$(SPKG_DESC_$(Q)),<not set>)] are identical. Please make sure that all descriptions are unique by setting SPKG_DESC_<pkg> for each package.),))))
.PRECIOUS: $(WORKDIR)/%.pkginfo
--
1.7.5.4
More information about the devel
mailing list