All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package_rpm.bbclass: respect package overrides for the main package
@ 2020-05-25  7:45 Michael Ho
  2020-05-26 17:02 ` [OE-core] " Steve Sakoman
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ho @ 2020-05-25  7:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: Michael Ho

From: Michael Ho <Michael.Ho@bmw.de>

Apply ${PN} to OVERRIDES when determining the base package spec variables.
Without this, there is a mismatch in behaviour where overrides for the base
package have no effect while overrides for subpackages do. The subpackages
should not be affected by this override as they apply their own package
overrides and will by default fetch the base variables and apply them in
the spec file.

This makes the behaviour for package overrides match the implementation
in package_deb.bbclass and package_ipk.bbclass.

Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
---
 meta/classes/package_rpm.bbclass | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9a4be2e..519c22b 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -286,16 +286,18 @@ python write_specfile () {
 
     # Construct the SPEC file...
     srcname    = d.getVar('PN')
-    srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
-    srcversion = d.getVar('PKGV').replace('-', '+')
-    srcrelease = d.getVar('PKGR')
-    srcepoch   = (d.getVar('PKGE') or "")
-    srclicense = d.getVar('LICENSE')
-    srcsection = d.getVar('SECTION')
-    srcmaintainer  = d.getVar('MAINTAINER')
-    srchomepage    = d.getVar('HOMEPAGE')
-    srcdescription = d.getVar('DESCRIPTION') or "."
-    srccustomtagschunk = get_package_additional_metadata("rpm", d)
+    localdata = bb.data.createCopy(d)
+    localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
+    srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
+    srcversion = localdata.getVar('PKGV').replace('-', '+')
+    srcrelease = localdata.getVar('PKGR')
+    srcepoch   = (localdata.getVar('PKGE') or "")
+    srclicense = localdata.getVar('LICENSE')
+    srcsection = localdata.getVar('SECTION')
+    srcmaintainer  = localdata.getVar('MAINTAINER')
+    srchomepage    = localdata.getVar('HOMEPAGE')
+    srcdescription = localdata.getVar('DESCRIPTION') or "."
+    srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
 
     srcdepends     = d.getVar('DEPENDS')
     srcrdepends    = []
-- 
2.7.4


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

* Re: [OE-core] [PATCH] package_rpm.bbclass: respect package overrides for the main package
  2020-05-25  7:45 [PATCH] package_rpm.bbclass: respect package overrides for the main package Michael Ho
@ 2020-05-26 17:02 ` Steve Sakoman
  2020-05-28 11:30   ` Michael Ho
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Sakoman @ 2020-05-26 17:02 UTC (permalink / raw)
  To: Michael Ho; +Cc: Patches and discussions about the oe-core layer

Does this patch (and the follow-on series) make sense for inclusion in dunfell?

Steve

On Sun, May 24, 2020 at 9:46 PM Michael Ho <Michael.Ho@bmw.de> wrote:
>
> From: Michael Ho <Michael.Ho@bmw.de>
>
> Apply ${PN} to OVERRIDES when determining the base package spec variables.
> Without this, there is a mismatch in behaviour where overrides for the base
> package have no effect while overrides for subpackages do. The subpackages
> should not be affected by this override as they apply their own package
> overrides and will by default fetch the base variables and apply them in
> the spec file.
>
> This makes the behaviour for package overrides match the implementation
> in package_deb.bbclass and package_ipk.bbclass.
>
> Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
> ---
>  meta/classes/package_rpm.bbclass | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 9a4be2e..519c22b 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -286,16 +286,18 @@ python write_specfile () {
>
>      # Construct the SPEC file...
>      srcname    = d.getVar('PN')
> -    srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
> -    srcversion = d.getVar('PKGV').replace('-', '+')
> -    srcrelease = d.getVar('PKGR')
> -    srcepoch   = (d.getVar('PKGE') or "")
> -    srclicense = d.getVar('LICENSE')
> -    srcsection = d.getVar('SECTION')
> -    srcmaintainer  = d.getVar('MAINTAINER')
> -    srchomepage    = d.getVar('HOMEPAGE')
> -    srcdescription = d.getVar('DESCRIPTION') or "."
> -    srccustomtagschunk = get_package_additional_metadata("rpm", d)
> +    localdata = bb.data.createCopy(d)
> +    localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
> +    srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
> +    srcversion = localdata.getVar('PKGV').replace('-', '+')
> +    srcrelease = localdata.getVar('PKGR')
> +    srcepoch   = (localdata.getVar('PKGE') or "")
> +    srclicense = localdata.getVar('LICENSE')
> +    srcsection = localdata.getVar('SECTION')
> +    srcmaintainer  = localdata.getVar('MAINTAINER')
> +    srchomepage    = localdata.getVar('HOMEPAGE')
> +    srcdescription = localdata.getVar('DESCRIPTION') or "."
> +    srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
>
>      srcdepends     = d.getVar('DEPENDS')
>      srcrdepends    = []
> --
> 2.7.4
>
> 

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

* Re: [OE-core] [PATCH] package_rpm.bbclass: respect package overrides for the main package
  2020-05-26 17:02 ` [OE-core] " Steve Sakoman
@ 2020-05-28 11:30   ` Michael Ho
  2020-05-29  3:39     ` Steve Sakoman
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ho @ 2020-05-28 11:30 UTC (permalink / raw)
  To: sakoman; +Cc: openembedded-core

Hi Steve,

Not sure if that question was for me or the general community. I think the follow-on series fixing the sstate-caching might be nice in dunfell but I'd defer judgement to the community about this one as it's about changing a behavior in the recipes and I don't know what LTS guidelines there are in place in the project.

Should I in the future address patches to the dunfell branch? (Where might I find the guidelines for submitting to dunfell vs master).

Thanks.

Kind regards,
Michael

-- 
BMW Car IT GmbH
Michael Ho
Spezialist Entwicklung – Build and Release Engineering
Lise-Meitner-Straße 14
89081 Ulm

Tel.: ­+49-731-37804-071
Mobil: +49-152-54980-471
Fax: +49-731-37804-001
Mail: michael.ho@bmw-carit.de 
Web: http://www.bmw-carit.de <http://www.bmw-carit.de/>
-------------------------------------------------------------------------
BMW Car IT GmbH
Geschäftsführer: Kai-Uwe Balszuweit und Michael Böttrich
Sitz und Registergericht: München HRB 134810
-------------------------------------------------------------------------
 

On 26.05.20, 19:02, "Steve Sakoman" <sakoman@gmail.com> wrote:

    Does this patch (and the follow-on series) make sense for inclusion in dunfell?

    Steve

    On Sun, May 24, 2020 at 9:46 PM Michael Ho <Michael.Ho@bmw.de> wrote:
    >
    > From: Michael Ho <Michael.Ho@bmw.de>
    >
    > Apply ${PN} to OVERRIDES when determining the base package spec variables.
    > Without this, there is a mismatch in behaviour where overrides for the base
    > package have no effect while overrides for subpackages do. The subpackages
    > should not be affected by this override as they apply their own package
    > overrides and will by default fetch the base variables and apply them in
    > the spec file.
    >
    > This makes the behaviour for package overrides match the implementation
    > in package_deb.bbclass and package_ipk.bbclass.
    >
    > Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
    > ---
    >  meta/classes/package_rpm.bbclass | 22 ++++++++++++----------
    >  1 file changed, 12 insertions(+), 10 deletions(-)
    >
    > diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
    > index 9a4be2e..519c22b 100644
    > --- a/meta/classes/package_rpm.bbclass
    > +++ b/meta/classes/package_rpm.bbclass
    > @@ -286,16 +286,18 @@ python write_specfile () {
    >
    >      # Construct the SPEC file...
    >      srcname    = d.getVar('PN')
    > -    srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
    > -    srcversion = d.getVar('PKGV').replace('-', '+')
    > -    srcrelease = d.getVar('PKGR')
    > -    srcepoch   = (d.getVar('PKGE') or "")
    > -    srclicense = d.getVar('LICENSE')
    > -    srcsection = d.getVar('SECTION')
    > -    srcmaintainer  = d.getVar('MAINTAINER')
    > -    srchomepage    = d.getVar('HOMEPAGE')
    > -    srcdescription = d.getVar('DESCRIPTION') or "."
    > -    srccustomtagschunk = get_package_additional_metadata("rpm", d)
    > +    localdata = bb.data.createCopy(d)
    > +    localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
    > +    srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
    > +    srcversion = localdata.getVar('PKGV').replace('-', '+')
    > +    srcrelease = localdata.getVar('PKGR')
    > +    srcepoch   = (localdata.getVar('PKGE') or "")
    > +    srclicense = localdata.getVar('LICENSE')
    > +    srcsection = localdata.getVar('SECTION')
    > +    srcmaintainer  = localdata.getVar('MAINTAINER')
    > +    srchomepage    = localdata.getVar('HOMEPAGE')
    > +    srcdescription = localdata.getVar('DESCRIPTION') or "."
    > +    srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
    >
    >      srcdepends     = d.getVar('DEPENDS')
    >      srcrdepends    = []
    > --
    > 2.7.4
    >
    > 


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

* Re: [OE-core] [PATCH] package_rpm.bbclass: respect package overrides for the main package
  2020-05-28 11:30   ` Michael Ho
@ 2020-05-29  3:39     ` Steve Sakoman
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2020-05-29  3:39 UTC (permalink / raw)
  To: Michael Ho; +Cc: Patches and discussions about the oe-core layer

Hi Michael,

On Thu, May 28, 2020 at 1:30 AM <Michael.Ho@bmw.de> wrote:

> Not sure if that question was for me or the general community. I think the follow-on series fixing the sstate-caching might be nice in dunfell but I'd defer judgement to the community about this one as it's about changing a behavior in the recipes and I don't know what LTS guidelines there are in place in the project.

Both :-)  If it is changing behavior then it probably isn't a
candidate for dunfell.

> Should I in the future address patches to the dunfell branch? (Where might I find the guidelines for submitting to dunfell vs master)

Yes, that would make my job easier.  I try to monitor all of the
patches coming in, but my knowledge isn't always deep enough to know
whether a particular patch is appropriate or not.  In that case I'll
often ask here on the list.

But if you tag a patch with [dunfell] then I'll know to give it
careful consideration and testing.

The general policy guidelines for LTS patches can be found here:

https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS

Thanks!

Steve

> On 26.05.20, 19:02, "Steve Sakoman" <sakoman@gmail.com> wrote:
>
>     Does this patch (and the follow-on series) make sense for inclusion in dunfell?
>
>     Steve
>
>     On Sun, May 24, 2020 at 9:46 PM Michael Ho <Michael.Ho@bmw.de> wrote:
>     >
>     > From: Michael Ho <Michael.Ho@bmw.de>
>     >
>     > Apply ${PN} to OVERRIDES when determining the base package spec variables.
>     > Without this, there is a mismatch in behaviour where overrides for the base
>     > package have no effect while overrides for subpackages do. The subpackages
>     > should not be affected by this override as they apply their own package
>     > overrides and will by default fetch the base variables and apply them in
>     > the spec file.
>     >
>     > This makes the behaviour for package overrides match the implementation
>     > in package_deb.bbclass and package_ipk.bbclass.
>     >
>     > Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
>     > ---
>     >  meta/classes/package_rpm.bbclass | 22 ++++++++++++----------
>     >  1 file changed, 12 insertions(+), 10 deletions(-)
>     >
>     > diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
>     > index 9a4be2e..519c22b 100644
>     > --- a/meta/classes/package_rpm.bbclass
>     > +++ b/meta/classes/package_rpm.bbclass
>     > @@ -286,16 +286,18 @@ python write_specfile () {
>     >
>     >      # Construct the SPEC file...
>     >      srcname    = d.getVar('PN')
>     > -    srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
>     > -    srcversion = d.getVar('PKGV').replace('-', '+')
>     > -    srcrelease = d.getVar('PKGR')
>     > -    srcepoch   = (d.getVar('PKGE') or "")
>     > -    srclicense = d.getVar('LICENSE')
>     > -    srcsection = d.getVar('SECTION')
>     > -    srcmaintainer  = d.getVar('MAINTAINER')
>     > -    srchomepage    = d.getVar('HOMEPAGE')
>     > -    srcdescription = d.getVar('DESCRIPTION') or "."
>     > -    srccustomtagschunk = get_package_additional_metadata("rpm", d)
>     > +    localdata = bb.data.createCopy(d)
>     > +    localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
>     > +    srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
>     > +    srcversion = localdata.getVar('PKGV').replace('-', '+')
>     > +    srcrelease = localdata.getVar('PKGR')
>     > +    srcepoch   = (localdata.getVar('PKGE') or "")
>     > +    srclicense = localdata.getVar('LICENSE')
>     > +    srcsection = localdata.getVar('SECTION')
>     > +    srcmaintainer  = localdata.getVar('MAINTAINER')
>     > +    srchomepage    = localdata.getVar('HOMEPAGE')
>     > +    srcdescription = localdata.getVar('DESCRIPTION') or "."
>     > +    srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
>     >
>     >      srcdepends     = d.getVar('DEPENDS')
>     >      srcrdepends    = []
>     > --
>     > 2.7.4
>     >
>     > 
>

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

end of thread, other threads:[~2020-05-29  3:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  7:45 [PATCH] package_rpm.bbclass: respect package overrides for the main package Michael Ho
2020-05-26 17:02 ` [OE-core] " Steve Sakoman
2020-05-28 11:30   ` Michael Ho
2020-05-29  3:39     ` Steve Sakoman

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.