[oe] [RFC] PKGPV/PKGPR of the PKG fame

Robert Schuster theBohemian at gmx.net
Fri Feb 15 17:07:39 UTC 2008


Hi,
while I like the general idea the proposed implemented is not so nice
IMHO because
	- it works only for ipk packaging (should be agnostic)
	- for dependency resolution the original version values are used

IMHO this stuff should be done in packaging.bbclass instead.

Regards
Robert

Paul Sokolovsky schrieb:
> Hello,
> 
> We now have ability to arbitrarily rename a package as built by
> package manager using PKG_<name> construct. Natural and consistent
> extension to that would be to allow to rename other parts of full
> package name - version and release.
> 
> This is useful for building meta-recipes, which package something from
> external source without need to know version beforehand.
> 
> ============================================================
> --- classes/package_ipk.bbclass	026a54435a436ef29405fa6b02afea519cc76ce7
> +++ classes/package_ipk.bbclass	8e5149b5da37896aa010037382baaf42cefec0a6
> @@ -166,10 +166,19 @@ python do_package_ipk () {
>  
>  		bb.data.setVar('ROOT', '', localdata)
>  		bb.data.setVar('ROOT_%s' % pkg, root, localdata)
> +
>  		pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1)
>  		if not pkgname:
>  			pkgname = pkg
>  		bb.data.setVar('PKG', pkgname, localdata)
> +		pv = bb.data.getVar('PKGPV_%s' % pkg, localdata, 1)
> +		if not pv:
> +		    pv = bb.data.getVar('PV', localdata, 1)
> +		bb.data.setVar('PKGPV', pv, localdata)
> +		pv = bb.data.getVar('PKGPR_%s' % pkg, localdata, 1)
> +		if not pv:
> +		    pv = bb.data.getVar('PR', localdata, 1)
> +		bb.data.setVar('PKGPR', pv, localdata)
>  
>  		overrides = bb.data.getVar('OVERRIDES', localdata)
>  		if not overrides:
> @@ -207,9 +216,9 @@ python do_package_ipk () {
>  		fields = []
>  		pe = bb.data.getVar('PE', d, 1)
>  		if pe and int(pe) > 0:
> -			fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
> +			fields.append(["Version: %s:%s-%s\n", ['PE', 'PKGPV', 'PKGPR']])
>  		else:
> -			fields.append(["Version: %s-%s\n", ['PV', 'PR']])
> +			fields.append(["Version: %s-%s\n", ['PKGPV', 'PKGPR']])
>  		fields.append(["Description: %s\n", ['DESCRIPTION']])
>  		fields.append(["Section: %s\n", ['SECTION']])
>  		fields.append(["Priority: %s\n", ['PRIORITY']])
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20080215/64d7811b/attachment-0002.sig>


More information about the Openembedded-devel mailing list