mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
package.bbclass: check packages name conflict in do_package
It is possible to rename packages with the macro PKG:${PN} and result in a package name conflict if the target name exists already. Add a fatal check to prevent this issue to go unnoticed. Fix [Yocto #12060] Reviewed-by: Yoann CONGAL <yoann.congal@smile.fr> (From OE-Core rev: c6cdb13c8cf31dd2613817b0dab9599f77f59921) Signed-off-by: Fawzi KHABER <fawzi.khaber@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f6cb63d3a871c4eef52d981131a56bf41aa1dcdf) Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
parent
517c97a80e
commit
684dfc79ff
|
@ -2449,6 +2449,15 @@ python do_package () {
|
|||
|
||||
bb.build.exec_func("package_convert_pr_autoinc", d)
|
||||
|
||||
# Check for conflict between renamed packages and existing ones
|
||||
# for each package in PACKAGES, check if it will be renamed to an existing one
|
||||
for p in packages:
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', p)
|
||||
rename = localdata.getVar('PKG')
|
||||
if (rename != None) and rename in packages:
|
||||
bb.fatal('package "%s" is renamed to "%s" using PKG:%s, but package name already exists'%(p,rename,p))
|
||||
|
||||
###########################################################################
|
||||
# Optimisations
|
||||
###########################################################################
|
||||
|
|
Loading…
Reference in New Issue
Block a user