[OE-core] [RFC][PATCH 2/2] packagedata: Show error when trying to change PE/PV/PR from runtime/pkgdata
Martin Jansa
martin.jansa at gmail.com
Wed Apr 3 10:14:34 UTC 2013
* causes build failure before do_package_write_ipk fails when trying to use wrong WORKDIR
---
meta/classes/packagedata.bbclass | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/meta/classes/packagedata.bbclass b/meta/classes/packagedata.bbclass
index 120cd64..b22458e 100644
--- a/meta/classes/packagedata.bbclass
+++ b/meta/classes/packagedata.bbclass
@@ -1,7 +1,10 @@
python read_subpackage_metadata () {
import oe.packagedata
+ pe = d.getVar('PE', True)
pn = d.getVar('PN', True)
+ pr = d.getVar('PR', True)
+ pv = d.getVar('PV', True)
data = oe.packagedata.read_pkgdata(pn, d)
for key in data.keys():
@@ -14,5 +17,17 @@ python read_subpackage_metadata () {
if sdata[key] != pn:
bb.fatal("Recipe %s is trying to create package %s which was already written by recipe %s. This will cause corruption, please resolve this and only provide the package from one recipe or the other or only build one of the recipes." % (pn, pkg, sdata[key]))
continue
+ if key == "PE":
+ if sdata[key] != pe:
+ bb.fatal("Recipe %s is trying to change PE from '%s' to '%s'. This will cause do_package_write_ipk failing to find right workdir." % (pn, pe, sdata[key]))
+ continue
+ if key == "PV":
+ if sdata[key] != pv:
+ bb.fatal("Recipe %s is trying to change PV from '%s' to '%s'. This will cause do_package_write_ipk failing to find right workdir." % (pn, pv, sdata[key]))
+ continue
+ if key == "PR":
+ if sdata[key] != pr:
+ bb.fatal("Recipe %s is trying to change PR from '%s' to '%s'. This will cause do_package_write_ipk failing to find right workdir." % (pn, pr, sdata[key]))
+ continue
d.setVar(key, sdata[key])
}
--
1.8.1.5
More information about the Openembedded-core
mailing list