summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-30 22:44:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-30 22:44:52 -0700
commitc2109b765b24a7ffe4781257ad3fe4641a3b2a49 (patch)
tree5f964b4e8fe6371a0388cc78c41a758668ce3ddc
parent23bf856215fa7c34a71d6086ee355f7c0672dbab (diff)
downloadopenembedded-core-c2109b765b24a7ffe4781257ad3fe4641a3b2a49.tar.gz
openembedded-core-c2109b765b24a7ffe4781257ad3fe4641a3b2a49.tar.bz2
openembedded-core-c2109b765b24a7ffe4781257ad3fe4641a3b2a49.zip
sstate: Ensure master.list exists if it doesn't already
This fixes builds where master.list doesn't already exist. This change was meant to be part of the previous sstate commit but ended up separated. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 02594a7d33..003763b412 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -146,6 +146,8 @@ def sstate_install(ss, d):
mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
whitelist = d.getVar("SSTATE_DUPWHITELIST", True)
lock = bb.utils.lockfile(mastermanifest + ".lock")
+ if not os.path.exists(mastermanifest):
+ open(mastermanifest, "w").close()
fileslist = [line.strip() for line in open(mastermanifest)]
bb.utils.unlockfile(lock)
match = []
@@ -302,6 +304,8 @@ def sstate_clean_manifest(manifest, d):
# Remove the entries from the master manifest
mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
lock = bb.utils.lockfile(mastermanifest + ".lock")
+ if not os.path.exists(mastermanifest):
+ open(mastermanifest, "w").close()
mf = open(mastermanifest + ".new", "w")
for line in open(mastermanifest, "r"):
if not line or line in entries: