summaryrefslogtreecommitdiffstats
path: root/build/f_isoroot
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2015-12-15 15:57:46 +0100
committerStefan K. Berg <stefan.k.berg@ericsson.com>2015-12-18 00:37:25 +0100
commit429392e6041fd5777c9a5a437f6455bca0fe3ed8 (patch)
tree730b872ef172ea826251f24decaead2e89090146 /build/f_isoroot
parentf86c13c4e5a301946e6151bf57760dcebab67265 (diff)
Fix for cache handling
Introduced a separate function "getcommitid" in the cache.sh - a.k.a. $(CACHETOOL) - so that given a repo and a tag, branch or commitid the corresponding commitid is returned. The same principle should be used in all caching functions where not a strict tag or head is specified (as git ls-remote will not be able to figure out the commit id in those cases). Change-Id: I3540dca7ab408c872eaabdc68d4058f9d6d7c45f Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'build/f_isoroot')
-rw-r--r--build/f_isoroot/f_bgpvpn-pluginbuild/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
index 443a8e39c..3da8d38b9 100644
--- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
+++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile
@@ -61,7 +61,11 @@ release:.bgpvpnbuild
# - The SHA1 hash of the HEAD on the plugin repo's $(BGPVPN_BRANCH)
# - The contents of this Makefile
.cacheid:
- git ls-remote --heads $(BGPVPN_REPO) | grep $(BGPVPN_BRANCH) > .cachedata
+ if [ ! -z $(BGPVPN_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_BRANCH) > .cachedata; \
+ fi
sha1sum Makefile >> .cachedata
sha1sum config.mk >> .cachedata
cat .cachedata | $(CACHETOOL) getid > .cacheid