All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package_deb: Remove version from Provides Field
@ 2014-03-13 15:31 Ricardo Ribalda Delgado
  2014-03-25  8:26 ` Ricardo Ribalda Delgado
  2014-03-25  8:50 ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-13 15:31 UTC (permalink / raw)
  To: openembedded-core, sgw, richard.purdie

According to Debian Policy Manual. Chapter 7.1

All of the fields except for Provides may restrict their applicability
to particular versions of each named package. This is done in
parentheses after each individual package name; the parentheses should
contain a relation from the list below followed by a version number, in
the format described in Version, Section 5.6.12.

This Fixes the following warning:

root@qt5022:~# apt-get update

...

Reading package lists... Done
W: Ignoring Provides line with DepCompareOp for package
pkgconfig__pkg-config__
W: You may want to run apt-get update to correct these problems

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/classes/package_deb.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 2d2f3f1..905af24 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -322,6 +322,13 @@ python do_package_deb () {
 
         mapping_rename_hook(localdata)
 
+        def debian_cmp_purgeversion(var):
+            # dpkg does not allow versions on Provides.
+            # From Debian Policy Manual, Chapter 7:
+            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
+            for key in var:
+                var[key] = []
+
         def debian_cmp_remap(var):
             # dpkg does not allow for '(' or ')' in a dependency name
             # replace these instances with '__' and '__'
@@ -359,6 +366,7 @@ python do_package_deb () {
         debian_cmp_remap(rsuggests)
         rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
         debian_cmp_remap(rprovides)
+        debian_cmp_purgeversion(rprovides)
         rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
         debian_cmp_remap(rreplaces)
         rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
-- 
1.9.0



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

* Re: [PATCH] package_deb: Remove version from Provides Field
  2014-03-13 15:31 [PATCH] package_deb: Remove version from Provides Field Ricardo Ribalda Delgado
@ 2014-03-25  8:26 ` Ricardo Ribalda Delgado
  2014-03-25  8:50 ` Richard Purdie
  1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-25  8:26 UTC (permalink / raw)
  To: openembedded-core, sgw, Richard Purdie

Ping

On Thu, Mar 13, 2014 at 4:31 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
> According to Debian Policy Manual. Chapter 7.1
>
> All of the fields except for Provides may restrict their applicability
> to particular versions of each named package. This is done in
> parentheses after each individual package name; the parentheses should
> contain a relation from the list below followed by a version number, in
> the format described in Version, Section 5.6.12.
>
> This Fixes the following warning:
>
> root@qt5022:~# apt-get update
>
> ...
>
> Reading package lists... Done
> W: Ignoring Provides line with DepCompareOp for package
> pkgconfig__pkg-config__
> W: You may want to run apt-get update to correct these problems
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  meta/classes/package_deb.bbclass | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
> index 2d2f3f1..905af24 100644
> --- a/meta/classes/package_deb.bbclass
> +++ b/meta/classes/package_deb.bbclass
> @@ -322,6 +322,13 @@ python do_package_deb () {
>
>          mapping_rename_hook(localdata)
>
> +        def debian_cmp_purgeversion(var):
> +            # dpkg does not allow versions on Provides.
> +            # From Debian Policy Manual, Chapter 7:
> +            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
> +            for key in var:
> +                var[key] = []
> +
>          def debian_cmp_remap(var):
>              # dpkg does not allow for '(' or ')' in a dependency name
>              # replace these instances with '__' and '__'
> @@ -359,6 +366,7 @@ python do_package_deb () {
>          debian_cmp_remap(rsuggests)
>          rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
>          debian_cmp_remap(rprovides)
> +        debian_cmp_purgeversion(rprovides)
>          rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
>          debian_cmp_remap(rreplaces)
>          rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
> --
> 1.9.0
>



-- 
Ricardo Ribalda


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

* Re: [PATCH] package_deb: Remove version from Provides Field
  2014-03-13 15:31 [PATCH] package_deb: Remove version from Provides Field Ricardo Ribalda Delgado
  2014-03-25  8:26 ` Ricardo Ribalda Delgado
@ 2014-03-25  8:50 ` Richard Purdie
  2014-03-25  8:54   ` Ricardo Ribalda Delgado
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-03-25  8:50 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Thu, 2014-03-13 at 16:31 +0100, Ricardo Ribalda Delgado wrote:
> According to Debian Policy Manual. Chapter 7.1
> 
> All of the fields except for Provides may restrict their applicability
> to particular versions of each named package. This is done in
> parentheses after each individual package name; the parentheses should
> contain a relation from the list below followed by a version number, in
> the format described in Version, Section 5.6.12.
> 
> This Fixes the following warning:
> 
> root@qt5022:~# apt-get update
> 
> ...
> 
> Reading package lists... Done
> W: Ignoring Provides line with DepCompareOp for package
> pkgconfig__pkg-config__
> W: You may want to run apt-get update to correct these problems
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  meta/classes/package_deb.bbclass | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
> index 2d2f3f1..905af24 100644
> --- a/meta/classes/package_deb.bbclass
> +++ b/meta/classes/package_deb.bbclass
> @@ -322,6 +322,13 @@ python do_package_deb () {
>  
>          mapping_rename_hook(localdata)
>  
> +        def debian_cmp_purgeversion(var):
> +            # dpkg does not allow versions on Provides.
> +            # From Debian Policy Manual, Chapter 7:
> +            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
> +            for key in var:
> +                var[key] = []
> +
Shouldn't this actually make a version comparison, i.e. if <condition>
then emit the Provides, otherwise don't (looking at the package version
for comparison)?

I can imagine having multiple versions of a recipe, some with provides
and some without, all using the same code.

Cheers,

Richard

         def debian_cmp_remap(var):
>              # dpkg does not allow for '(' or ')' in a dependency name
>              # replace these instances with '__' and '__'
> @@ -359,6 +366,7 @@ python do_package_deb () {
>          debian_cmp_remap(rsuggests)
>          rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
>          debian_cmp_remap(rprovides)
> +        debian_cmp_purgeversion(rprovides)
>          rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
>          debian_cmp_remap(rreplaces)
>          rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")




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

* Re: [PATCH] package_deb: Remove version from Provides Field
  2014-03-25  8:50 ` Richard Purdie
@ 2014-03-25  8:54   ` Ricardo Ribalda Delgado
  2014-03-25  9:19     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-25  8:54 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hello Richard

It is ok to have Provides, but they should not have a version number.
If they have a version number a nasty warning appears (as you can see
on the patch). The provided patch just clears all the versions but
keeps the Provides

We could "fix" dpkg to support versioning, but I believe it is better
to just remove the version number from the Provides.

Cheers!

On Tue, Mar 25, 2014 at 9:50 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2014-03-13 at 16:31 +0100, Ricardo Ribalda Delgado wrote:
>> According to Debian Policy Manual. Chapter 7.1
>>
>> All of the fields except for Provides may restrict their applicability
>> to particular versions of each named package. This is done in
>> parentheses after each individual package name; the parentheses should
>> contain a relation from the list below followed by a version number, in
>> the format described in Version, Section 5.6.12.
>>
>> This Fixes the following warning:
>>
>> root@qt5022:~# apt-get update
>>
>> ...
>>
>> Reading package lists... Done
>> W: Ignoring Provides line with DepCompareOp for package
>> pkgconfig__pkg-config__
>> W: You may want to run apt-get update to correct these problems
>>
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> ---
>>  meta/classes/package_deb.bbclass | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
>> index 2d2f3f1..905af24 100644
>> --- a/meta/classes/package_deb.bbclass
>> +++ b/meta/classes/package_deb.bbclass
>> @@ -322,6 +322,13 @@ python do_package_deb () {
>>
>>          mapping_rename_hook(localdata)
>>
>> +        def debian_cmp_purgeversion(var):
>> +            # dpkg does not allow versions on Provides.
>> +            # From Debian Policy Manual, Chapter 7:
>> +            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
>> +            for key in var:
>> +                var[key] = []
>> +
> Shouldn't this actually make a version comparison, i.e. if <condition>
> then emit the Provides, otherwise don't (looking at the package version
> for comparison)?
>
> I can imagine having multiple versions of a recipe, some with provides
> and some without, all using the same code.
>
> Cheers,
>
> Richard
>
>          def debian_cmp_remap(var):
>>              # dpkg does not allow for '(' or ')' in a dependency name
>>              # replace these instances with '__' and '__'
>> @@ -359,6 +366,7 @@ python do_package_deb () {
>>          debian_cmp_remap(rsuggests)
>>          rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
>>          debian_cmp_remap(rprovides)
>> +        debian_cmp_purgeversion(rprovides)
>>          rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
>>          debian_cmp_remap(rreplaces)
>>          rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
>
>



-- 
Ricardo Ribalda


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

* Re: [PATCH] package_deb: Remove version from Provides Field
  2014-03-25  8:54   ` Ricardo Ribalda Delgado
@ 2014-03-25  9:19     ` Richard Purdie
  2014-03-25 10:54       ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-03-25  9:19 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Tue, 2014-03-25 at 09:54 +0100, Ricardo Ribalda Delgado wrote:
> Hello Richard
> 
> It is ok to have Provides, but they should not have a version number.
> If they have a version number a nasty warning appears (as you can see
> on the patch). The provided patch just clears all the versions but
> keeps the Provides
> 
> We could "fix" dpkg to support versioning, but I believe it is better
> to just remove the version number from the Provides.

We can also do the version comparison in package_deb.bbclass itself. I
believe there is some code somewhere which can understand the different
constraints.

Cheers,

Richard

> Cheers!
> 
> On Tue, Mar 25, 2014 at 9:50 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Thu, 2014-03-13 at 16:31 +0100, Ricardo Ribalda Delgado wrote:
> >> According to Debian Policy Manual. Chapter 7.1
> >>
> >> All of the fields except for Provides may restrict their applicability
> >> to particular versions of each named package. This is done in
> >> parentheses after each individual package name; the parentheses should
> >> contain a relation from the list below followed by a version number, in
> >> the format described in Version, Section 5.6.12.
> >>
> >> This Fixes the following warning:
> >>
> >> root@qt5022:~# apt-get update
> >>
> >> ...
> >>
> >> Reading package lists... Done
> >> W: Ignoring Provides line with DepCompareOp for package
> >> pkgconfig__pkg-config__
> >> W: You may want to run apt-get update to correct these problems
> >>
> >> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> >> ---
> >>  meta/classes/package_deb.bbclass | 8 ++++++++
> >>  1 file changed, 8 insertions(+)
> >>
> >> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
> >> index 2d2f3f1..905af24 100644
> >> --- a/meta/classes/package_deb.bbclass
> >> +++ b/meta/classes/package_deb.bbclass
> >> @@ -322,6 +322,13 @@ python do_package_deb () {
> >>
> >>          mapping_rename_hook(localdata)
> >>
> >> +        def debian_cmp_purgeversion(var):
> >> +            # dpkg does not allow versions on Provides.
> >> +            # From Debian Policy Manual, Chapter 7:
> >> +            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
> >> +            for key in var:
> >> +                var[key] = []
> >> +
> > Shouldn't this actually make a version comparison, i.e. if <condition>
> > then emit the Provides, otherwise don't (looking at the package version
> > for comparison)?
> >
> > I can imagine having multiple versions of a recipe, some with provides
> > and some without, all using the same code.
> >
> > Cheers,
> >
> > Richard
> >
> >          def debian_cmp_remap(var):
> >>              # dpkg does not allow for '(' or ')' in a dependency name
> >>              # replace these instances with '__' and '__'
> >> @@ -359,6 +366,7 @@ python do_package_deb () {
> >>          debian_cmp_remap(rsuggests)
> >>          rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
> >>          debian_cmp_remap(rprovides)
> >> +        debian_cmp_purgeversion(rprovides)
> >>          rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
> >>          debian_cmp_remap(rreplaces)
> >>          rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
> >
> >
> 
> 
> 




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

* Re: [PATCH] package_deb: Remove version from Provides Field
  2014-03-25  9:19     ` Richard Purdie
@ 2014-03-25 10:54       ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-25 10:54 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

ok, but for the next release wont be a good idea to fix the warning in dpkg?

On Tue, Mar 25, 2014 at 10:19 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2014-03-25 at 09:54 +0100, Ricardo Ribalda Delgado wrote:
>> Hello Richard
>>
>> It is ok to have Provides, but they should not have a version number.
>> If they have a version number a nasty warning appears (as you can see
>> on the patch). The provided patch just clears all the versions but
>> keeps the Provides
>>
>> We could "fix" dpkg to support versioning, but I believe it is better
>> to just remove the version number from the Provides.
>
> We can also do the version comparison in package_deb.bbclass itself. I
> believe there is some code somewhere which can understand the different
> constraints.
>
> Cheers,
>
> Richard
>
>> Cheers!
>>
>> On Tue, Mar 25, 2014 at 9:50 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Thu, 2014-03-13 at 16:31 +0100, Ricardo Ribalda Delgado wrote:
>> >> According to Debian Policy Manual. Chapter 7.1
>> >>
>> >> All of the fields except for Provides may restrict their applicability
>> >> to particular versions of each named package. This is done in
>> >> parentheses after each individual package name; the parentheses should
>> >> contain a relation from the list below followed by a version number, in
>> >> the format described in Version, Section 5.6.12.
>> >>
>> >> This Fixes the following warning:
>> >>
>> >> root@qt5022:~# apt-get update
>> >>
>> >> ...
>> >>
>> >> Reading package lists... Done
>> >> W: Ignoring Provides line with DepCompareOp for package
>> >> pkgconfig__pkg-config__
>> >> W: You may want to run apt-get update to correct these problems
>> >>
>> >> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> >> ---
>> >>  meta/classes/package_deb.bbclass | 8 ++++++++
>> >>  1 file changed, 8 insertions(+)
>> >>
>> >> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
>> >> index 2d2f3f1..905af24 100644
>> >> --- a/meta/classes/package_deb.bbclass
>> >> +++ b/meta/classes/package_deb.bbclass
>> >> @@ -322,6 +322,13 @@ python do_package_deb () {
>> >>
>> >>          mapping_rename_hook(localdata)
>> >>
>> >> +        def debian_cmp_purgeversion(var):
>> >> +            # dpkg does not allow versions on Provides.
>> >> +            # From Debian Policy Manual, Chapter 7:
>> >> +            # All of the fields except for Provides may restrict their applicability to particular versions of each named package.
>> >> +            for key in var:
>> >> +                var[key] = []
>> >> +
>> > Shouldn't this actually make a version comparison, i.e. if <condition>
>> > then emit the Provides, otherwise don't (looking at the package version
>> > for comparison)?
>> >
>> > I can imagine having multiple versions of a recipe, some with provides
>> > and some without, all using the same code.
>> >
>> > Cheers,
>> >
>> > Richard
>> >
>> >          def debian_cmp_remap(var):
>> >>              # dpkg does not allow for '(' or ')' in a dependency name
>> >>              # replace these instances with '__' and '__'
>> >> @@ -359,6 +366,7 @@ python do_package_deb () {
>> >>          debian_cmp_remap(rsuggests)
>> >>          rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or "")
>> >>          debian_cmp_remap(rprovides)
>> >> +        debian_cmp_purgeversion(rprovides)
>> >>          rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
>> >>          debian_cmp_remap(rreplaces)
>> >>          rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
>> >
>> >
>>
>>
>>
>
>



-- 
Ricardo Ribalda


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

end of thread, other threads:[~2014-03-25 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 15:31 [PATCH] package_deb: Remove version from Provides Field Ricardo Ribalda Delgado
2014-03-25  8:26 ` Ricardo Ribalda Delgado
2014-03-25  8:50 ` Richard Purdie
2014-03-25  8:54   ` Ricardo Ribalda Delgado
2014-03-25  9:19     ` Richard Purdie
2014-03-25 10:54       ` Ricardo Ribalda Delgado

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.