From dc68f0d6bf57502dde5c212f3afe062ed93eb19e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 30 Aug 2012 22:44:48 -0700 Subject: [PATCH] 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 --- meta/classes/sstate.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 02594a7..003763b 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: -- 2.7.4