From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Wed, 4 Jan 2012 22:36:36 +0200 From: Michael Shigorin To: community@lists.altlinux.org Message-ID: <20120104203636.GI16304@osdn.org.ua> Mail-Followup-To: community@lists.altlinux.org References: <4F048E32.9080908@mail.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F048E32.9080908@mail.ru> User-Agent: Mutt/1.4.2.1i Subject: Re: [Comm] mkimage (not installed) X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: shigorin@gmail.com, ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2012 20:36:45 -0000 Archived-At: List-Archive: List-Post: --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Jan 04, 2012 at 09:36:50PM +0400, Vladimir Karpinsky wrote: > Читал http://www.altlinux.org/Mkimage/Profiles/m-p и решил [...] > $ cat build/build.log > Makefile:13: /usr/share/mkimage/config.mk: Нет такого файла или каталога [...] > В природе не существует ни файла /usr/share/mkimage/targets.mk, > ни даже каталога /usr/share/mkimage. Что-то не установлено? # apt-get install mkimage Спасибо, дополнил QUICKSTART в части команд (словами там уже было). Н-да, я делал проверку версии, но не доступности... Если хотите, проверьте приложенный патч -- не уверен, что стоит выпускать 0.5.3.1 (в пакете mkimage-profiles зависимость на mkimage прописана). Прикладывать при помощи git am. -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=koi8-u Content-Disposition: attachment; filename="0001-check-vigorously-for-installed-mkimage.patch" Content-Transfer-Encoding: 8bit >>From 0ec7d7cd015cc2979ca9d763a7bb5ed7c93536bc Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 4 Jan 2012 22:30:56 +0200 Subject: [PATCH] check vigorously for installed mkimage It was briefly mentioned in QUICKSTART but somehow managed to evade the commandlines provided. And while at it, let's make errors like this more explicit to avoid extra lookups. Oh, and fix QUICKSTART so that readers miss the hassle. :) Thanks Vladimir Karpinsky for pointing this problem out. --- QUICKSTART | 2 +- image.in/Makefile | 6 +++++- lib/build.mk | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/QUICKSTART b/QUICKSTART index ae03404..113c34d 100644 --- a/QUICKSTART +++ b/QUICKSTART @@ -15,7 +15,7 @@ п╨п╬п╪п╟п╫п╢я▀ ~~~~~~~ - п╬я┌ п╦п╪п╣п╫п╦ root: -# apt-get install hasher git-core +# apt-get install mkimage hasher git-core # hasher-useradd USER - п╬я┌ п╦п╪п╣п╫п╦ п©п╬п╩я▄п╥п╬п╡п╟я┌п╣п╩я▐ (п©п╬я│п╩п╣ п©п╬п╡я┌п╬я─п╫п╬пЁп╬ п╡я┘п╬п╢п╟): diff --git a/image.in/Makefile b/image.in/Makefile index 7455585..a722c9a 100644 --- a/image.in/Makefile +++ b/image.in/Makefile @@ -10,8 +10,10 @@ MKI_VER_OPTIMAL = 0.2.0 include distcfg.mk include functions.mk -include $(MKIMAGE_PREFIX)/config.mk +ifeq (,$(realpath $(MKIMAGE_PREFIX)/config.mk)) +$(error please apt-get install mkimage and have a look at QUICKSTART as well) +endif ifeq (-,$(shell rpmvercmp $(MKI_VERSION) $(MKI_VER_MINIMAL) | tr -d [0-9])) $(info error: mkimage-$(MKI_VERSION) is too old, please upgrade) $(error mkimage is too old, $(MKI_VER_MINIMAL) is minimal supported version) @@ -21,6 +23,8 @@ $(info warning: mkimage-$(MKI_VERSION) is suboptimal, consider upgrading) $(warning consider upgrading mkimage to $(MKI_VER_OPTIMAL) or better) endif +include $(MKIMAGE_PREFIX)/config.mk + # reconstruct instead of passing yet another variable IMAGE_LINK := $(IMAGE_NAME).$(IMAGE_TYPE) IMAGE_OUTFILE := $(IMAGE_NAME)-$(DATE)-$(ARCH).$(IMAGE_TYPE) diff --git a/lib/build.mk b/lib/build.mk index 839adb7..fa26a56 100644 --- a/lib/build.mk +++ b/lib/build.mk @@ -45,8 +45,8 @@ build-image: profile/populate if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \ echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \ tail -200 "$(BUILDLOG)" $(SHORTEN) \ - | GREP_COLOR="$(ANSI_OK)" \ - grep --color=auto '^\*\* image: .*' ||:; \ + | GREP_COLOR="$(ANSI_OK)" GREP_OPTIONS="--color=auto" \ + grep '^\*\* image: .*' ||:; \ else \ echo -n "$(TIME) failed, see log"; \ if [ -z "$(DEBUG)" ]; then \ @@ -56,8 +56,8 @@ build-image: profile/populate echo " above"; \ fi; \ tail -200 "$(BUILDLOG)" \ - | GREP_COLOR="$(ANSI_FAIL)" \ - egrep --color=auto "^(E:|[Ee]rror|[Ww]arning).*"; \ + | GREP_COLOR="$(ANSI_FAIL)" GREP_OPTIONS="--color=auto" \ + egrep "^((E:|[Ee]rror|[Ww]arning).*)|(.* Stop\.)$$"; \ df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \ { print "NB: low space on "$$6" ("$$5" used)"}}'; \ fi; \ -- 1.7.7.5 --7JfCtLOvnd9MIVvH--