7016863 userland build fails in parallel
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Thu, 03 Feb 2011 12:26:51 -0800
changeset 70 c610cf9d3d5d
parent 69 e25d8641f0c5
child 71 8a9ee3f95d47
7016863 userland build fails in parallel
components/Makefile
make-rules/ips.mk
make-rules/shared-macros.mk
--- a/components/Makefile	Thu Feb 03 10:37:43 2011 -0800
+++ b/components/Makefile	Thu Feb 03 12:26:51 2011 -0800
@@ -63,15 +63,25 @@
 clobber:	$(COMPONENT_DIRS:%=%.nosetup) clean
 	$(RM) -r $(WS_REPO) $(WS_LOGS) $(WS_LINT_CACHE)
 
-setup:	$(WS_LOGS) repo tools .profile
+setup:	$(WS_LOGS) $(WS_REPO) tools $(WS_LINT_CACHE)
 
 $(WS_LOGS):
 	$(MKDIR) $@
 
-repo:
+$(WS_REPO):
 	$(PKGSEND) -s $(PKG_REPO) create-repository \
 		--set-property publisher.prefix=$(PUBLISHER)
 
+$(WS_LINT_CACHE):	$(WS_LOGS)
+ifdef CANONICAL_REPO
+	@echo "Generating pkglint(1) cache from $(CANONICAL_REPO)..."
+	@(echo "set name=fmri value=pkg:/dummy" | $(PKGLINT) \
+		-c $(WS_LINT_CACHE) -r $(CANONICAL_REPO) /dev/fd/0 \
+		>$(WS_LOGS)/naughty-canonical-repo-actions 2>&1 ; exit 0)
+else
+	$(MKDIR) $(WS_LINT_CACHE)
+endif
+
 tools:
 	@cd ../tools ; echo "building tools..." ; $(GMAKE) setup
 
--- a/make-rules/ips.mk	Thu Feb 03 10:37:43 2011 -0800
+++ b/make-rules/ips.mk	Thu Feb 03 12:26:51 2011 -0800
@@ -142,7 +142,7 @@
 $(MANIFEST_BASE)-%.linted:	$(MANIFEST_BASE)-%.resolved
 	@echo "VALIDATING MANIFEST CONTENT: $<"
 	PYTHONPATH=$(WS_TOOLS)/python $(PKGLINT) \
-		$(CANONICAL_REPO:%=-r % -c $(WS_LINT_CACHE)) \
+		$(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
 		-f $(WS_TOOLS)/pkglintrc $<
 	$(PKGFMT) <$< >$@
 
--- a/make-rules/shared-macros.mk	Thu Feb 03 10:37:43 2011 -0800
+++ b/make-rules/shared-macros.mk	Thu Feb 03 12:26:51 2011 -0800
@@ -50,7 +50,7 @@
 WS_MAKE_RULES =	$(WS_TOP)/make-rules
 WS_COMPONENTS =	$(WS_TOP)/components
 WS_INCORPORATIONS =	$(WS_TOP)/incorporations
-WS_LINT_CACHE =	$(WS_TOP)/cache
+WS_LINT_CACHE =	$(WS_TOP)/pkglint-cache
 
 BASS_O_MATIC =	$(WS_TOOLS)/bass-o-matic
 
@@ -170,6 +170,7 @@
 GPATCH_FLAGS =	-p1 -b
 
 PKGSEND =	/usr/bin/pkgsend
+PKGLINT =	/usr/bin/pkglint
 
 TOUCH =		/usr/bin/touch
 MKDIR =		/bin/mkdir -p