From a6cc9fa8c312e3752f182c38e48bb4e8c5ac0840 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Tue, 10 Apr 2012 18:48:27 +0400 Subject: [PATCH] lib/build.mk: tweaked wreckage filter A pretty common issue breaking the image build is inter-package file conflict resulting in hsh-install failure down there. Let's bring that back to attention conveniently. --- lib/build.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/build.mk b/lib/build.mk index cd618b61..c2272ac5 100644 --- a/lib/build.mk +++ b/lib/build.mk @@ -2,6 +2,8 @@ ANSI_OK ?= 1;32 ANSI_FAIL ?= 1;31 +GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (Stop|failed)\.))$$ + ifndef MKIMAGE_PROFILES $(error this makefile is designed to be included in toplevel one) endif @@ -48,7 +50,7 @@ build-image: profile/populate echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \ tail -200 "$(BUILDLOG)" $(SHORTEN) \ | GREP_COLOR="$(ANSI_OK)" GREP_OPTIONS="--color=auto" \ - grep '^\*\* image: .*' ||:; \ + grep '^\*\* image: .*$$' ||:; \ else \ echo -n "$(TIME) failed, see log"; \ if [ -z "$(DEBUG)" ]; then \ @@ -59,7 +61,7 @@ build-image: profile/populate fi; \ tail -200 "$(BUILDLOG)" \ | GREP_COLOR="$(ANSI_FAIL)" GREP_OPTIONS="--color=auto" \ - egrep "^((E:|[Ee]rror|[Ww]arning).*)|(.* Stop\.)$$"; \ + egrep "$(GOTCHA)"; \ df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \ { print "NB: low space on "$$6" ("$$5" used)"}}'; \ fi; \