diff options
| author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
|---|---|---|
| committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
| commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
| tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/classes/packagedata.bbclass | |
| download | poky-daisy-140929.tar.gz | |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/classes/packagedata.bbclass')
| -rw-r--r-- | meta/classes/packagedata.bbclass | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/classes/packagedata.bbclass b/meta/classes/packagedata.bbclass new file mode 100644 index 0000000000..d1aedf2289 --- /dev/null +++ b/meta/classes/packagedata.bbclass | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | python read_subpackage_metadata () { | ||
| 2 | import oe.packagedata | ||
| 3 | |||
| 4 | vars = { | ||
| 5 | "PN" : d.getVar('PN', True), | ||
| 6 | "PE" : d.getVar('PE', True), | ||
| 7 | "PV" : d.getVar('PV', True), | ||
| 8 | "PR" : d.getVar('PR', True), | ||
| 9 | } | ||
| 10 | |||
| 11 | data = oe.packagedata.read_pkgdata(vars["PN"], d) | ||
| 12 | |||
| 13 | for key in data.keys(): | ||
| 14 | d.setVar(key, data[key]) | ||
| 15 | |||
| 16 | for pkg in d.getVar('PACKAGES', True).split(): | ||
| 17 | sdata = oe.packagedata.read_subpkgdata(pkg, d) | ||
| 18 | for key in sdata.keys(): | ||
| 19 | if key in vars: | ||
| 20 | if sdata[key] != vars[key]: | ||
| 21 | if key == "PN": | ||
| 22 | 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." % (vars[key], pkg, sdata[key])) | ||
| 23 | bb.fatal("Recipe %s is trying to change %s from '%s' to '%s'. This will cause do_package_write_* failures since the incorrect data will be used and they will be unable to find the right workdir." % (vars["PN"], key, vars[key], sdata[key])) | ||
| 24 | continue | ||
| 25 | d.setVar(key, sdata[key]) | ||
| 26 | } | ||
