From d7343e37500cdd7fae3f11236efaa4a19d8c9bb6 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 9 Oct 2015 17:18:42 +0100 Subject: [PATCH] ap-fetch-*: Support $AP_FETCH_PLACEHOLDERS envvar which outputs a placeholder And use this in standalone-generate-dump-flight-runvars. In general I don't think we are interested in the specific revision_* runvars when using this tool but when it matters this new behaviour can be avoided by setting AP_FETCH_PLACEHOLDERS=n. This is quicker even than using memoisation on the ap-fetch invocations and produces output like: libvirt build-amd64 revision_xen ap-fetch-version-baseline:xen-unstable This is useful when doing comparisons of before and after changes to e.g. make-flight since they do not pickup noise if a something/someone does a push in the middle. The memoisation bits of standalone-generate-dump-flight-runvars are disabled if AP_FETCH_PLACEHOLDERS=y. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- ap-common | 9 +++++++++ ap-fetch-version | 2 ++ ap-fetch-version-baseline | 3 +++ ap-fetch-version-baseline-late | 2 ++ ap-fetch-version-old | 2 ++ standalone-generate-dump-flight-runvars | 10 ++++++++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/ap-common b/ap-common index 91425a9..5b6e088 100644 --- a/ap-common +++ b/ap-common @@ -145,3 +145,12 @@ info_linux_tree () { return 0 } + +check_ap_fetch_placeholders () { + if [ "x$AP_FETCH_PLACEHOLDERS" != xy ] ; then + return 0 + fi + + echo "$(basename $0):$branch" + exit 0 +} diff --git a/ap-fetch-version b/ap-fetch-version index 6fa7588..f884bd3 100755 --- a/ap-fetch-version +++ b/ap-fetch-version @@ -25,6 +25,8 @@ branch=$1 select_xenbranch . ./ap-common +check_ap_fetch_placeholders + if info_linux_tree "$branch"; then repo_tree_rev_fetch_git linux \ $TREE_LINUX_THIS $TAG_LINUX_THIS $LOCALREV_LINUX diff --git a/ap-fetch-version-baseline b/ap-fetch-version-baseline index 2e42508..c9da82c 100755 --- a/ap-fetch-version-baseline +++ b/ap-fetch-version-baseline @@ -22,6 +22,9 @@ set -e -o posix branch=$1 . ./cri-lock-repos +. ./ap-common + +check_ap_fetch_placeholders : ${BASE_TREE_LINUX:=git://xenbits.xen.org/people/ianc/linux-2.6.git} : ${BASE_TAG_LINUX:=xen/next-2.6.32} diff --git a/ap-fetch-version-baseline-late b/ap-fetch-version-baseline-late index 9856ec9..dff8b05 100755 --- a/ap-fetch-version-baseline-late +++ b/ap-fetch-version-baseline-late @@ -27,6 +27,8 @@ new=$2 select_xenbranch . ./ap-common +check_ap_fetch_placeholders + case "$branch" in linux-next) diff --git a/ap-fetch-version-old b/ap-fetch-version-old index 66d51f8..99f276a 100755 --- a/ap-fetch-version-old +++ b/ap-fetch-version-old @@ -25,6 +25,8 @@ branch=$1 select_xenbranch . ./ap-common +check_ap_fetch_placeholders + : ${BASE_TAG_LINUX2639:=tested/2.6.39.x} : ${BASE_LOCALREV_LINUX:=daily-cron.$branch.old} : ${BASE_LOCALREV_LIBVIRT:=daily-cron.$branch.old} diff --git a/standalone-generate-dump-flight-runvars b/standalone-generate-dump-flight-runvars index 4217719..e91026a 100755 --- a/standalone-generate-dump-flight-runvars +++ b/standalone-generate-dump-flight-runvars @@ -36,11 +36,17 @@ if [ $# = 0 ]; then set `./mg-list-all-branches` fi -if [ "x$AP_FETCH_MEMO_KEEP" = x ]; then +: ${AP_FETCH_PLACEHOLDERS:=y} +export AP_FETCH_PLACEHOLDERS + + +if [ "x$AP_FETCH_PLACEHOLDERS" != xy ]; then + if [ "x$AP_FETCH_MEMO_KEEP" = x ]; then rm -rf tmp/apmemo mkdir tmp/apmemo + fi + export AP_FETCH_PFX='./memoise tmp/apmemo' fi -export AP_FETCH_PFX='./memoise tmp/apmemo' # In the future it might be nice for this script to arrange to use a # separate standalone.db, in tmp/ probably, for each different branch. -- 2.39.5