From 1c2f5eea2c4bcc8d7654e11deccc428616156a6b Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 9 Nov 2020 10:51:56 +0100 Subject: [PATCH] testing: Improve building different revisions of Git-recipes If we check out and build a certain revision of a dependency in a branch and switch to another that requires a different revision and then switch back, the previous approach installed the wrong revision as it would incorrectly assume the required revision was already built and ready to install. --- testing/scripts/recipes/005_anet.mk | 4 ++-- testing/scripts/recipes/006_tkm-rpc.mk | 4 ++-- testing/scripts/recipes/007_x509-ada.mk | 4 ++-- testing/scripts/recipes/008_xfrm-ada.mk | 4 ++-- testing/scripts/recipes/009_xfrm-proxy.mk | 4 ++-- testing/scripts/recipes/010_tkm.mk | 4 ++-- testing/scripts/recipes/011_botan.mk | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/testing/scripts/recipes/005_anet.mk b/testing/scripts/recipes/005_anet.mk index b311c0a99..abb2db4d3 100644 --- a/testing/scripts/recipes/005_anet.mk +++ b/testing/scripts/recipes/005_anet.mk @@ -14,11 +14,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make LIBRARY_KIND=static - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make PREFIX=$(PREFIX) LIBRARY_KIND=static install diff --git a/testing/scripts/recipes/006_tkm-rpc.mk b/testing/scripts/recipes/006_tkm-rpc.mk index 22e34fad3..f80cd6e71 100644 --- a/testing/scripts/recipes/006_tkm-rpc.mk +++ b/testing/scripts/recipes/006_tkm-rpc.mk @@ -16,11 +16,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make PREFIX=$(PREFIX) install diff --git a/testing/scripts/recipes/007_x509-ada.mk b/testing/scripts/recipes/007_x509-ada.mk index 112f93999..08e57fc60 100644 --- a/testing/scripts/recipes/007_x509-ada.mk +++ b/testing/scripts/recipes/007_x509-ada.mk @@ -14,11 +14,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make tests && make - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make PREFIX=$(PREFIX) install diff --git a/testing/scripts/recipes/008_xfrm-ada.mk b/testing/scripts/recipes/008_xfrm-ada.mk index 64ada0e45..82590eeb0 100644 --- a/testing/scripts/recipes/008_xfrm-ada.mk +++ b/testing/scripts/recipes/008_xfrm-ada.mk @@ -16,11 +16,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make PREFIX=$(PREFIX) install diff --git a/testing/scripts/recipes/009_xfrm-proxy.mk b/testing/scripts/recipes/009_xfrm-proxy.mk index bdf5b1211..dc42b3673 100644 --- a/testing/scripts/recipes/009_xfrm-proxy.mk +++ b/testing/scripts/recipes/009_xfrm-proxy.mk @@ -14,11 +14,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make install diff --git a/testing/scripts/recipes/010_tkm.mk b/testing/scripts/recipes/010_tkm.mk index 2651660db..863a755d6 100644 --- a/testing/scripts/recipes/010_tkm.mk +++ b/testing/scripts/recipes/010_tkm.mk @@ -14,11 +14,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && make - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make install diff --git a/testing/scripts/recipes/011_botan.mk b/testing/scripts/recipes/011_botan.mk index 3224f6250..eea21043b 100644 --- a/testing/scripts/recipes/011_botan.mk +++ b/testing/scripts/recipes/011_botan.mk @@ -20,11 +20,11 @@ all: install .$(PKG)-checkout-$(REV): .$(PKG)-cloned cd $(PKG) && git fetch && git checkout $(REV) - @touch $@ + @rm -f .$(PKG)-checkout-* && touch $@ .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV) cd $(PKG) && python ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS) - @touch $@ + @rm -f .$(PKG)-built-* && touch $@ install: .$(PKG)-built-$(REV) cd $(PKG) && make install && ldconfig