Hello,

For some reason, this breaks the reproducible build:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2589/steps/13/logs/stdio

ERROR: packagenameconflict-1.0-r0 do_package: package "packagenameconflict-dev" 
is renamed to "packagenameconflict-renametest" using 
PKG:packagenameconflict-dev, but package name already exists
ERROR: Logfile of failure stored in: 
/home/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleA/tmp/work/core2-64-poky-linux/packagenameconflict/1.0-r0/temp/log.do_package.3523737
NOTE: recipe packagenameconflict-1.0-r0: task do_package: Failed
ERROR: Task 
(/home/pokybuild/yocto-worker/reproducible/build/build-st/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb:do_package)
 failed with exit code '1'
NOTE: Running task 12650 of 16502 
(/home/pokybuild/yocto-worker/reproducible/build/build-st/meta-selftest/recipes-devtools/python/python3-async-test_0.6.2.bb:do_package)

On 22/03/2023 17:42:23+0100, Fawzi KHABER wrote:
> 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 <[email protected]>
> Signed-off-by: Fawzi KHABER <[email protected]>
> ---
>  meta/classes-global/package.bbclass | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/meta/classes-global/package.bbclass 
> b/meta/classes-global/package.bbclass
> index 7e96601cd9..30dfd63d4f 100644
> --- a/meta/classes-global/package.bbclass
> +++ b/meta/classes-global/package.bbclass
> @@ -496,6 +496,16 @@ 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 %s using PKG:%s, but package 
> name already exists'%(p,rename,p))
> +
>      
> ###########################################################################
>      # Optimisations
>      
> ###########################################################################
> -- 
> 2.39.2
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178970): 
https://lists.openembedded.org/g/openembedded-core/message/178970
Mute This Topic: https://lists.openembedded.org/mt/97782594/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to