diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-21 22:49:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-24 20:09:00 +0000 |
commit | 1f8f6fe4eb6884ac3a254d4ef54c7841e407ecab (patch) | |
tree | e47096dcdcf724e9821cecb773aa3131e181c0c8 /meta | |
parent | 932a4cdf4ba4368a2f9e066ed086d08a449f92ec (diff) | |
download | poky-1f8f6fe4eb6884ac3a254d4ef54c7841e407ecab.tar.gz |
packagedata: Add error message if multiple recipes try to write the same package
If multiple recipes try and write the same package it resulted in a
rather confusing traceback and unintuitive error. This patch
prints a human readable error instead.
[YOCTO #3645]
(From OE-Core rev: 6f817779af77fdb0b861297f0f43c4c6607ce6f0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/packagedata.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/packagedata.bbclass b/meta/classes/packagedata.bbclass index 790d874c1c..120cd6445f 100644 --- a/meta/classes/packagedata.bbclass +++ b/meta/classes/packagedata.bbclass | |||
@@ -1,7 +1,8 @@ | |||
1 | python read_subpackage_metadata () { | 1 | python read_subpackage_metadata () { |
2 | import oe.packagedata | 2 | import oe.packagedata |
3 | 3 | ||
4 | data = oe.packagedata.read_pkgdata(d.getVar('PN', True), d) | 4 | pn = d.getVar('PN', True) |
5 | data = oe.packagedata.read_pkgdata(pn, d) | ||
5 | 6 | ||
6 | for key in data.keys(): | 7 | for key in data.keys(): |
7 | d.setVar(key, data[key]) | 8 | d.setVar(key, data[key]) |
@@ -9,5 +10,9 @@ python read_subpackage_metadata () { | |||
9 | for pkg in d.getVar('PACKAGES', True).split(): | 10 | for pkg in d.getVar('PACKAGES', True).split(): |
10 | sdata = oe.packagedata.read_subpkgdata(pkg, d) | 11 | sdata = oe.packagedata.read_subpkgdata(pkg, d) |
11 | for key in sdata.keys(): | 12 | for key in sdata.keys(): |
13 | if key == "PN": | ||
14 | if sdata[key] != pn: | ||
15 | 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])) | ||
16 | continue | ||
12 | d.setVar(key, sdata[key]) | 17 | d.setVar(key, sdata[key]) |
13 | } | 18 | } |