Commit 0ec7d7cd authored by Michael Shigorin's avatar Michael Shigorin

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.
parent 426c985d
......@@ -15,7 +15,7 @@
команды
~~~~~~~
- от имени root:
# apt-get install hasher git-core
# apt-get install mkimage hasher git-core
# hasher-useradd USER
- от имени пользователя (после повторного входа):
......
......@@ -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)
......
......@@ -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; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment