All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] PKGPV/PKGPR of the PKG fame
@ 2008-02-15 15:50 Paul Sokolovsky
  2008-02-15 16:07 ` Robert Schuster
  2008-02-15 17:07 ` Robert Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Sokolovsky @ 2008-02-15 15:50 UTC (permalink / raw)
  To: openembedded-devel

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']])


-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] PKGPV/PKGPR of the PKG fame
  2008-02-15 15:50 [RFC] PKGPV/PKGPR of the PKG fame Paul Sokolovsky
@ 2008-02-15 16:07 ` Robert Schuster
  2008-02-15 17:07 ` Robert Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Schuster @ 2008-02-15 16:07 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2140 bytes --]

Hi,
this is the best thing since sliced bread for those poor souls building
compatible packages for existing non-OE made distributions.

+1 from me.

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']])
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] PKGPV/PKGPR of the PKG fame
  2008-02-15 15:50 [RFC] PKGPV/PKGPR of the PKG fame Paul Sokolovsky
  2008-02-15 16:07 ` Robert Schuster
@ 2008-02-15 17:07 ` Robert Schuster
  2008-02-15 18:36   ` Paul Sokolovsky
  1 sibling, 1 reply; 4+ messages in thread
From: Robert Schuster @ 2008-02-15 17:07 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2264 bytes --]

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']])
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] PKGPV/PKGPR of the PKG fame
  2008-02-15 17:07 ` Robert Schuster
@ 2008-02-15 18:36   ` Paul Sokolovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Sokolovsky @ 2008-02-15 18:36 UTC (permalink / raw)
  To: openembedded-devel; +Cc: theBohemian

Hello,

On Fri, 15 Feb 2008 18:07:39 +0100
Robert Schuster <theBohemian@gmx.net> wrote:

> 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)

That's just a sample of implementation. As it is now, it seems that
each format-specific package class needs to handle it on its own.

> 	- for dependency resolution the original version values are
> used

If you mean version under which this package will be dependent
upon, then for sure yes, I didn't even consider that area. My usecase
is to create "proxy" packages which would already fit into existing
dependency chains - just exactly need to set PV to match external
expectations.

> 
> IMHO this stuff should be done in packaging.bbclass instead.
> 
> Regards
> Robert
> 
[]

-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-15 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 15:50 [RFC] PKGPV/PKGPR of the PKG fame Paul Sokolovsky
2008-02-15 16:07 ` Robert Schuster
2008-02-15 17:07 ` Robert Schuster
2008-02-15 18:36   ` Paul Sokolovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.