diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-08-07 00:09:49 +0200 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-08-09 07:55:09 -0700 |
commit | 9aac194d7db79129dcbed29cfb89c57dccf33729 (patch) | |
tree | 41b85548be68ffcdbf1214aba7ae6f29ec4aa7e3 /meta/classes/buildhistory.bbclass | |
parent | 44624853de8c88abdcae2ccd0902b390ff546d4c (diff) | |
download | openembedded-core-9aac194d7db79129dcbed29cfb89c57dccf33729.tar.gz openembedded-core-9aac194d7db79129dcbed29cfb89c57dccf33729.tar.bz2 openembedded-core-9aac194d7db79129dcbed29cfb89c57dccf33729.zip |
buildhistory: use bb.utils.mkdirhier instead of os.makedirs
* Multiple do_fetch[prefunc] can happen at the same time and
if not os.path.exists(pkghistdir):
os.makedirs(pkghistdir)
isn't safe
* Use bb.utils.mkdirhier which doesn't raise error when directory exists
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 55b6bbf496..c32c7aa868 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -169,7 +169,7 @@ python buildhistory_emit_pkghistory() { packagelist = packages.split() if not os.path.exists(pkghistdir): - os.makedirs(pkghistdir) + bb.utils.mkdirhier(pkghistdir) else: # Remove files for packages that no longer exist for item in os.listdir(pkghistdir): @@ -268,7 +268,7 @@ def write_pkghistory(pkginfo, d): pkgpath = os.path.join(pkghistdir, pkginfo.name) if not os.path.exists(pkgpath): - os.makedirs(pkgpath) + bb.utils.mkdirhier(pkgpath) infofile = os.path.join(pkgpath, "latest") with open(infofile, "w") as f: @@ -579,7 +579,7 @@ python write_srcrev() { srcrevs, tag_srcrevs = _get_srcrev_values(d) if srcrevs: if not os.path.exists(pkghistdir): - os.makedirs(pkghistdir) + bb.utils.mkdirhier(pkghistdir) old_tag_srcrevs = {} if os.path.exists(srcrevfile): with open(srcrevfile) as f: |