[yocto] [auh][PATCH 13/21] Add protection measures and information against running with existing build directories.
Alexander Kanavin
alexander.kanavin at linux.intel.com
Thu Dec 21 08:27:21 PST 2017
This should help e.g. with the following issue:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7174
Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
README | 12 ++++++++----
upgradehelper.py | 14 ++++++++++++++
weeklyjob.sh | 2 +-
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/README b/README
index fabde5c..27b0977 100644
--- a/README
+++ b/README
@@ -17,10 +17,14 @@ Setup
$ git config --global user.name "Some Name"
$ git config --global user.email "somename at somedomain.com"
-1. Ensure you have a working copy of the build system that is configured
- and ready to run, i.e. you've run the oe-init-build-env script to
- create a build directory and edited local.conf / bblayers.conf as
- desired.
+1. Run the oe-init-build-env script to create a fresh build directory, solely
+ for the purpose of running AUH:
+
+ $ . ./oe-init-build-env build-auh
+
+ Re-using existing build directories and configurations is not recommended
+ as they may contains tweaks that will break AUH or make it behave in
+ undesirable ways.
2. Prepare a configuration file, by default in $BUILDDIR/upgrade-helper/
upgrade-helper.conf, as below:
diff --git a/upgradehelper.py b/upgradehelper.py
index a33a3bf..9110efc 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -788,6 +788,8 @@ if __name__ == "__main__":
if not os.getenv('BUILDDIR', False):
E(" You must source oe-init-build-env before running this script!\n")
+ E(" It is recommended to create a fresh build directory with it:\n")
+ E(" $ . oe-init-build-env build-auh\n")
exit(1)
devnull = open(os.devnull, 'wb')
@@ -796,6 +798,18 @@ if __name__ == "__main__":
E(" Git isn't configured please configure user name and email\n")
exit(1)
+ with open(os.getenv('BUILDDIR')+"/conf/local.conf") as f:
+ import re
+ for line in f.readlines():
+ if re.match(r"^MACHINE\s*=", line):
+ E(" The following line found in local.conf - please use ?= or ?== instead as otherwise AUH will not be able to set the desired target machine\n")
+ E(" {}".format(line))
+ exit(1)
+ if re.match(r"^TCLIBC\s*=", line):
+ E(" The following line found in local.conf - please use ?= or ?== instead as otherwise AUH will not be able to set the desired C library\n")
+ E(" {}".format(line))
+ exit(1)
+
signal.signal(signal.SIGINT, close_child_processes)
debug_levels = [log.CRITICAL, log.ERROR, log.WARNING, log.INFO, log.DEBUG]
diff --git a/weeklyjob.sh b/weeklyjob.sh
index 8dd0a1c..ac50461 100755
--- a/weeklyjob.sh
+++ b/weeklyjob.sh
@@ -10,7 +10,7 @@
# Re-assign these to match your setup!
auh_dir=~/auto-upgrade-helper
poky_dir=~/poky
-build_dir=~/build
+build_dir=~/build-tmp-auh-upgrades
sstate_dir=~/sstate-cache
pushd $poky_dir
--
2.15.1
More information about the yocto
mailing list