summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-03-02 00:45:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-02 18:43:25 +0000
commit39aec4ac7feb9475aa8143bd8854438f10532ab1 (patch)
tree86691ac80c8363c531a6325c491b67be1be9e6fe
parenta559a2cba9284a1531fbc402c6fda1c5a51259c1 (diff)
downloadpoky-39aec4ac7feb9475aa8143bd8854438f10532ab1.tar.gz
buildhistory.bbclass: create the buildhistory directory when needed
When the BUILDHISTORY_RESET is enabled we need to move the content from BUILDHISTORY_DIR to BUILDHISTORY_OLD_DIR but when we start a clean build in the first run we don't have the BUILDHISTORY_DIR so the move of files will fail. | ERROR: Command execution failed: Traceback (most recent call last): | File "/xxx/poky/bitbake/lib/bb/command.py", line 110, in runAsyncCommand | commandmethod(self.cmds_async, self, options) | File "/xxx/poky/bitbake/lib/bb/command.py", line 564, in buildTargets | command.cooker.buildTargets(pkgs_to_build, task) | File "/xxx/poky/bitbake/lib/bb/cooker.py", line 1481, in buildTargets | bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.databuilder.mcdata[mc]) | File "/xxx/home/builder/src/base/poky/bitbake/lib/bb/event.py", line 214, in fire | fire_class_handlers(event, d) | File "/xxx/poky/bitbake/lib/bb/event.py", line 121, in fire_class_handlers | execute_handler(name, handler, event, d) | File "/xxx/poky/bitbake/lib/bb/event.py", line 93, in execute_handler | ret = handler(event) | File "/xxx/poky/meta/classes/buildhistory.bbclass", line 919, in buildhistory_eventhandler | entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ] | FileNotFoundError: [Errno 2] No such file or directory: '/xxx/buildhistory' (From OE-Core rev: 97bc2168da7dbacdfbf79cd70db674363ab84f6b) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildhistory.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 49797a6701..8db79a4829 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -896,6 +896,7 @@ python buildhistory_eventhandler() {
896 if os.path.isdir(olddir): 896 if os.path.isdir(olddir):
897 shutil.rmtree(olddir) 897 shutil.rmtree(olddir)
898 rootdir = e.data.getVar("BUILDHISTORY_DIR") 898 rootdir = e.data.getVar("BUILDHISTORY_DIR")
899 bb.utils.mkdirhier(rootdir)
899 entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ] 900 entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ]
900 bb.utils.mkdirhier(olddir) 901 bb.utils.mkdirhier(olddir)
901 for entry in entries: 902 for entry in entries: