[csw-devel] SF.net SVN: gar:[19829] csw/mgar/gar/v2/gar.pkg.mk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Thu Dec 6 11:32:36 CET 2012
Revision: 19829
http://gar.svn.sourceforge.net/gar/?rev=19829&view=rev
Author: dmichelsen
Date: 2012-12-06 10:32:36 +0000 (Thu, 06 Dec 2012)
Log Message:
-----------
mGAR v2: Fixate package output directory for long running builds
Modified Paths:
--------------
csw/mgar/gar/v2/gar.pkg.mk
Modified: csw/mgar/gar/v2/gar.pkg.mk
===================================================================
--- csw/mgar/gar/v2/gar.pkg.mk 2012-12-06 10:02:36 UTC (rev 19828)
+++ csw/mgar/gar/v2/gar.pkg.mk 2012-12-06 10:32:36 UTC (rev 19829)
@@ -208,7 +208,14 @@
SPKG_SPOOLROOT ?= $(DESTROOT)
SPKG_SPOOLDIR ?= $(SPKG_SPOOLROOT)/spool.$(GAROSREL)-$(GARCH)
-SPKG_EXPORT ?= $(HOME)/staging/build-$(shell date '+%d.%b.%Y')
+ifdef SPKG_EXPORT
+# The definition may include variable parts like a call to "date". This would lead to different directory names
+# for multiple invocation in longs builds and a failing checkpkg due to lookup in wrong directories, so fixate
+# once what we have.
+SPKG_EXPORT := $(SPKG_EXPORT)
+else
+SPKG_EXPORT := $(HOME)/staging/build-$(shell date '+%d.%b.%Y')
+endif
SPKG_PKGROOT ?= $(PKGROOT)
SPKG_PKGBASE ?= $(PKGROOT)
SPKG_WORKDIR ?= $(CURDIR)/$(WORKDIR)
@@ -216,6 +223,10 @@
SPKG_DEPEND_DB = $(GARDIR)/csw/depend.db
+# These variables could change value transiently and need to be passed to subinvocations of GAR
+_PASS_GAR_SUBINVOCATION_EXPORTS += SPKG_EXPORT
+_PASS_GAR_ENV = $(foreach V,$(_PASS_GAR_SUBINVOCATION_EXPORTS),$V=$($V))
+
# This is the old specification being evaluated during mkpackage. The expansion of the SPKG_REVSTAMP leads to
# problems later on when need the filename for checkpkg again and too much time has passed. In the new approach
# the packagename is directly put in the gspec.
@@ -959,7 +970,7 @@
@echo
@echo "The following packages have been built:"
@echo
- @$(MAKE) -s GAR_PLATFORM=$(GAR_PLATFORM) _pkgshow
+ @$(MAKE) -s $(_PASS_GAR_ENV) GAR_PLATFORM=$(GAR_PLATFORM) _pkgshow
@echo
@$(DONADA)
@@ -968,7 +979,7 @@
dirpackage: _package
@echo "The following packages have been built:"
@echo
- @$(MAKE) -s GAR_PLATFORM=$(GAR_PLATFORM) _dirpkgshow
+ @$(MAKE) -s $(_PASS_GAR_ENV) GAR_PLATFORM=$(GAR_PLATFORM) _dirpkgshow
@echo
@$(DONADA)
@@ -1047,8 +1058,8 @@
$(foreach P,$(_PACKAGING_PLATFORMS),\
$(if $(PACKAGING_HOST_$P),\
$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
- $(MAKE) GAR_PLATFORM=$P _package && ,\
- $(SSH) -t $(PACKAGING_HOST_$P) "$(foreach V,$(_PROPAGATE_ENV),$(if $($V),$V=$($V))) $(MAKE) -I $(GARDIR) -C $(CURDIR) GAR_PLATFORM=$P _package" && \
+ $(MAKE) $(_PASS_GAR_ENV) GAR_PLATFORM=$P _package && ,\
+ $(SSH) -t $(PACKAGING_HOST_$P) "$(foreach V,$(_PROPAGATE_ENV),$(if $($V),$V=$($V))) $(MAKE) -I $(GARDIR) -C $(CURDIR) $(_PASS_GAR_ENV) GAR_PLATFORM=$P _package" && \
),\
$(error *** No host has been defined for platform $P)\
)\
@@ -1061,9 +1072,9 @@
$(if $(ARCHALL),echo " (suitable for all architectures)\c";) \
$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
echo " (built on this host)";\
- $(MAKE) -s GAR_PLATFORM=$P _pkgshow;echo;,\
+ $(MAKE) -s $(_PASS_GAR_ENV) GAR_PLATFORM=$P _pkgshow;echo;,\
echo " (built on host '$(PACKAGING_HOST_$P)')";\
- $(SSH) $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -I $(GARDIR) -C $(CURDIR) -s GAR_PLATFORM=$P _pkgshow";echo;\
+ $(SSH) $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -I $(GARDIR) -C $(CURDIR) -s $(_PASS_GAR_ENV) GAR_PLATFORM=$P _pkgshow";echo;\
)\
)
@$(MAKECOOKIE)
@@ -1073,8 +1084,8 @@
$(foreach P,$(_PACKAGING_PLATFORMS),\
$(if $(PACKAGING_HOST_$P),\
$(if $(filter $(THISHOST),$(PACKAGING_HOST_$P)),\
- $(MAKE) -s GAR_PLATFORM=$P $* && ,\
- $(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -I $(GARDIR) -C $(CURDIR) GAR_PLATFORM=$P $*" && \
+ $(MAKE) -s $(_PASS_GAR_ENV) GAR_PLATFORM=$P $* && ,\
+ $(SSH) -t $(PACKAGING_HOST_$P) "PATH=$$PATH:/opt/csw/bin $(MAKE) -I $(GARDIR) -C $(CURDIR) $(_PASS_GAR_ENV) GAR_PLATFORM=$P $*" && \
),\
$(error *** No host has been defined for platform $P)\
)\
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