From 92e045116a45ea43f47583d0b4cf225d9289d13e Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Wed, 9 May 2018 10:32:09 -0700 Subject: [PATCH] mock: add MOCK_OPTS Eventually developers - when they know what they're doing - want to manipulate a little bit the mock arguments to i.e skip a few stages in the mock build cycle while they're hacking a package. One example is when developers are testing changes to a spec file but not touching dependencies and they're [re]running the build multiple times it would be nice to not cleanup before the build and run a rebuild for example with: --rebuild --no-clean With this patch one should only do: make build MOCK_OPTS="--rebuild --no-clean" Signed-off-by: Leandro Dorileo --- Makefile.common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.common b/Makefile.common index 21ec95a..5c494e4 100644 --- a/Makefile.common +++ b/Makefile.common @@ -20,7 +20,7 @@ RPMS ?= $(LATEST_RPMS) WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo ) # MOCK_CONFIG_VAL is set in Makefile.shared -MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) +MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_OPTS) ifneq ($(wildcard upstream),) @@ -89,6 +89,7 @@ prebuild-checks: #help files and rpms in the results directory of your package. If there #help are mutlple tar.gz files for a package, make will do make sources, #help which creates a src.rpm file from the spec file. +#help Use MOCK_OPTS environment varible to pass down arbitrary mock options. build: prebuild-checks configemail $(SPECFILE) upstream $(SRPMFILE) $(MOCK) $(SRPMFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME) @perl $(TOPLVL)/projects/common/logcheck.pl results/build.log