summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass28
1 files changed, 27 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 3674a79060..5581af94b1 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -1,7 +1,9 @@
1SSTATE_VERSION = "1" 1SSTATE_VERSION = "1"
2 2
3SSTATE_MANIFESTS = "${TMPDIR}/sstate-control" 3SSTATE_MANIFESTS = "${TMPDIR}/sstate-control"
4SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-${PN}" 4SSTATE_MANFILEBASE = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-"
5SSTATE_MANFILEPREFIX = "${SSTATE_MANFILEBASE}${PN}"
6
5 7
6SSTATE_PKGARCH = "${BASE_PACKAGE_ARCH}" 8SSTATE_PKGARCH = "${BASE_PACKAGE_ARCH}"
7SSTATE_PKGNAME = "sstate-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-${BB_TASKHASH}" 9SSTATE_PKGNAME = "sstate-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-${BB_TASKHASH}"
@@ -84,6 +86,30 @@ def sstate_install(ss, d):
84 if os.access(manifest, os.R_OK): 86 if os.access(manifest, os.R_OK):
85 bb.fatal("Package already staged (%s)?!" % manifest) 87 bb.fatal("Package already staged (%s)?!" % manifest)
86 88
89 def checkmanifest(pn, task):
90 return os.access(bb.data.expand("${SSTATE_MANFILEBASE}%s.%s" % (pn, task), d), os.R_OK)
91
92 skipinst = False
93 pn = d.getVar("PN", True)
94 if pn == "gcc-cross-initial":
95 if checkmanifest("gcc-cross", "populate-sysroot"):
96 skipinst = True
97 if checkmanifest("gcc-cross-intermediate", "populate-sysroot"):
98 skipinst = True
99 elif pn == "gcc-cross-intermediate":
100 if checkmanifest("gcc-cross", "populate-sysroot"):
101 skipinst = True
102 elif pn == "glibc-initial":
103 if checkmanifest("glibc", "populate-sysroot"):
104 skipinst = True
105 elif pn == "eglibc-initial":
106 if checkmanifest("eglibc", "populate-sysroot"):
107 skipinst = True
108
109 if skipinst:
110 bb.note("Not staging %s.%s as sysroot already contains better functionality" % (pn, ss['name']))
111 return
112
87 locks = [] 113 locks = []
88 for lock in ss['lockfiles']: 114 for lock in ss['lockfiles']:
89 locks.append(bb.utils.lockfile(lock)) 115 locks.append(bb.utils.lockfile(lock))