summaryrefslogtreecommitdiffstats
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:45:56 -0700
commit9ba1e33e2d14362971d6441ee6142bcb0857df1a (patch)
tree08553ea7fa5b156c08fd6541d088838f1a8f7146
parentc5ce2878b313d7c16ca5c95d6c88b2dfadef5a00 (diff)
downloadpoky-9ba1e33e2d14362971d6441ee6142bcb0857df1a.tar.gz
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. (From OE-Core rev: c2109b765b24a7ffe4781257ad3fe4641a3b2a49) 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):
146 mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True) 146 mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
147 whitelist = d.getVar("SSTATE_DUPWHITELIST", True) 147 whitelist = d.getVar("SSTATE_DUPWHITELIST", True)
148 lock = bb.utils.lockfile(mastermanifest + ".lock") 148 lock = bb.utils.lockfile(mastermanifest + ".lock")
149 if not os.path.exists(mastermanifest):
150 open(mastermanifest, "w").close()
149 fileslist = [line.strip() for line in open(mastermanifest)] 151 fileslist = [line.strip() for line in open(mastermanifest)]
150 bb.utils.unlockfile(lock) 152 bb.utils.unlockfile(lock)
151 match = [] 153 match = []
@@ -302,6 +304,8 @@ def sstate_clean_manifest(manifest, d):
302 # Remove the entries from the master manifest 304 # Remove the entries from the master manifest
303 mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True) 305 mastermanifest = d.getVar("SSTATE_MASTERMANIFEST", True)
304 lock = bb.utils.lockfile(mastermanifest + ".lock") 306 lock = bb.utils.lockfile(mastermanifest + ".lock")
307 if not os.path.exists(mastermanifest):
308 open(mastermanifest, "w").close()
305 mf = open(mastermanifest + ".new", "w") 309 mf = open(mastermanifest + ".new", "w")
306 for line in open(mastermanifest, "r"): 310 for line in open(mastermanifest, "r"):
307 if not line or line in entries: 311 if not line or line in entries: