All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] json-glib: use PACKAGECONFIG for tests
@ 2020-11-04 12:12 Ross Burton
  2020-11-04 12:12 ` [PATCH 2/3] json-glib: update patch status Ross Burton
  2020-11-04 12:12 ` [PATCH 3/3] setuptools3: use DEPENDS_append instead of += Ross Burton
  0 siblings, 2 replies; 7+ messages in thread
From: Ross Burton @ 2020-11-04 12:12 UTC (permalink / raw
  To: openembedded-core

json-glib 1.6 has an option to enable or disable the tests, so use that
instead of a do_install_append.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-gnome/json-glib/json-glib_1.6.0.bb | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-gnome/json-glib/json-glib_1.6.0.bb b/meta/recipes-gnome/json-glib/json-glib_1.6.0.bb
index 82f983f3c5b..59b0609900b 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.6.0.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.6.0.bb
@@ -23,13 +23,9 @@ SRC_URI += "file://run-ptest \
             file://0001-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch"
 SRC_URI[archive.sha256sum] = "0d7c67602c4161ea7070fab6c5823afd9bd7f7bc955f652a50d3753b08494e73"
 
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
 PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native"
-
-do_install_append() {
-	if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
-		rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
-	fi
-}
+PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false"
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.25.1


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

* [PATCH 2/3] json-glib: update patch status
  2020-11-04 12:12 [PATCH 1/3] json-glib: use PACKAGECONFIG for tests Ross Burton
@ 2020-11-04 12:12 ` Ross Burton
  2020-11-04 12:12 ` [PATCH 3/3] setuptools3: use DEPENDS_append instead of += Ross Burton
  1 sibling, 0 replies; 7+ messages in thread
From: Ross Burton @ 2020-11-04 12:12 UTC (permalink / raw
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...1-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-gnome/json-glib/json-glib/0001-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch b/meta/recipes-gnome/json-glib/json-glib/0001-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch
index e5bfdcd4b72..0eb72441868 100644
--- a/meta/recipes-gnome/json-glib/json-glib/0001-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch
+++ b/meta/recipes-gnome/json-glib/json-glib/0001-json-glib-json-enum-types.c.in-fix-build-reproducibi.patch
@@ -7,7 +7,7 @@ Changes the comment and include to reference the file basename
 instead of the full path. This ensures that the generated file is
 reproducible when it is included in source packages meant for debugging.
 
-Upstream-Status: Pending
+Upstream-Status: Backport [6f3842abd5dff68b6ee5f2ef48a4ebf1cbebf434]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
 ---
  json-glib/json-enum-types.c.in | 4 ++--
-- 
2.25.1


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

* [PATCH 3/3] setuptools3: use DEPENDS_append instead of +=
  2020-11-04 12:12 [PATCH 1/3] json-glib: use PACKAGECONFIG for tests Ross Burton
  2020-11-04 12:12 ` [PATCH 2/3] json-glib: update patch status Ross Burton
@ 2020-11-04 12:12 ` Ross Burton
  2020-11-04 13:15   ` [OE-core] " Robert P. J. Day
  2020-11-04 19:48   ` Andre McCurdy
  1 sibling, 2 replies; 7+ messages in thread
From: Ross Burton @ 2020-11-04 12:12 UTC (permalink / raw
  To: openembedded-core

To help people who inherit setuptools3 and then assign DEPENDS with =.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes/setuptools3.bbclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
index 8ca66ee708e..4e6a9343d77 100644
--- a/meta/classes/setuptools3.bbclass
+++ b/meta/classes/setuptools3.bbclass
@@ -1,4 +1,3 @@
 inherit distutils3
 
-DEPENDS += "python3-setuptools-native"
-
+DEPENDS_append = " python3-setuptools-native"
-- 
2.25.1


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

* Re: [OE-core] [PATCH 3/3] setuptools3: use DEPENDS_append instead of +=
  2020-11-04 12:12 ` [PATCH 3/3] setuptools3: use DEPENDS_append instead of += Ross Burton
@ 2020-11-04 13:15   ` Robert P. J. Day
  2020-11-04 19:48   ` Andre McCurdy
  1 sibling, 0 replies; 7+ messages in thread
From: Robert P. J. Day @ 2020-11-04 13:15 UTC (permalink / raw
  To: Ross Burton; +Cc: openembedded-core

On Wed, 4 Nov 2020, Ross Burton wrote:

> To help people who inherit setuptools3 and then assign DEPENDS with =.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/classes/setuptools3.bbclass | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
> index 8ca66ee708e..4e6a9343d77 100644
> --- a/meta/classes/setuptools3.bbclass
> +++ b/meta/classes/setuptools3.bbclass
> @@ -1,4 +1,3 @@
>  inherit distutils3
>
> -DEPENDS += "python3-setuptools-native"
> -
> +DEPENDS_append = " python3-setuptools-native"

  i've wondered about this sort of thing for a while (and been burned
by similar things a time or two). admittedly, the above is an obvious
example where that dependency really needs to be there, no question.
but what about cases where the developer inherits a class file and
explicitly wants to set his own dependencies, not realizing the class
file uses "+=" (which he promptly steps all over by accident)?

  is there a standard that suggests that, say, class files always use
"_append" since they know what they're doing and want to protect the
user from being silly? or is there at least some responsbility on the
part of the developer to be at least minimally aware of what the class
file might be doing?

  thoughts?

rday



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

* Re: [OE-core] [PATCH 3/3] setuptools3: use DEPENDS_append instead of +=
  2020-11-04 12:12 ` [PATCH 3/3] setuptools3: use DEPENDS_append instead of += Ross Burton
  2020-11-04 13:15   ` [OE-core] " Robert P. J. Day
@ 2020-11-04 19:48   ` Andre McCurdy
  2020-11-05 23:30     ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Andre McCurdy @ 2020-11-04 19:48 UTC (permalink / raw
  To: Ross Burton; +Cc: OE Core mailing list

On Wed, Nov 4, 2020 at 4:12 AM Ross Burton <ross@burtonini.com> wrote:
>
> To help people who inherit setuptools3 and then assign DEPENDS with =.

It looks like there are other classes which could benefit from a
similar fix. Maybe it's good to try to standardise and update all of
them?

> Signed-off-by: Ross Burton <ross.burton@arm.com>> ---
>  meta/classes/setuptools3.bbclass | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
> index 8ca66ee708e..4e6a9343d77 100644
> --- a/meta/classes/setuptools3.bbclass
> +++ b/meta/classes/setuptools3.bbclass
> @@ -1,4 +1,3 @@
>  inherit distutils3
>
> -DEPENDS += "python3-setuptools-native"
> -
> +DEPENDS_append = " python3-setuptools-native"
> --
> 2.25.1
>
>
> 
>

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

* Re: [OE-core] [PATCH 3/3] setuptools3: use DEPENDS_append instead of +=
  2020-11-04 19:48   ` Andre McCurdy
@ 2020-11-05 23:30     ` Richard Purdie
  2020-11-06  2:32       ` Andre McCurdy
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2020-11-05 23:30 UTC (permalink / raw
  To: Andre McCurdy, Ross Burton; +Cc: OE Core mailing list

On Wed, 2020-11-04 at 11:48 -0800, Andre McCurdy wrote:
> On Wed, Nov 4, 2020 at 4:12 AM Ross Burton <ross@burtonini.com>
> wrote:
> > To help people who inherit setuptools3 and then assign DEPENDS with
> > =.
> 
> It looks like there are other classes which could benefit from a
> similar fix. Maybe it's good to try to standardise and update all of
> them?

This is kind of like a virus which spreads through the system. If you
set DEPENDS after an inherit in a recipe it should be "+=". I'd much
rather classes just did += too and we save appends and so on for where
they're really needed as they're hard to override.

The alternative is to iterate over the system changing more and more +=
-> append and end up making += pointless :/.

Cheers,

Richard




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

* Re: [OE-core] [PATCH 3/3] setuptools3: use DEPENDS_append instead of +=
  2020-11-05 23:30     ` Richard Purdie
@ 2020-11-06  2:32       ` Andre McCurdy
  0 siblings, 0 replies; 7+ messages in thread
From: Andre McCurdy @ 2020-11-06  2:32 UTC (permalink / raw
  To: Richard Purdie; +Cc: Ross Burton, OE Core mailing list

On Thu, Nov 5, 2020 at 3:30 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2020-11-04 at 11:48 -0800, Andre McCurdy wrote:
> > On Wed, Nov 4, 2020 at 4:12 AM Ross Burton <ross@burtonini.com>
> > wrote:
> > > To help people who inherit setuptools3 and then assign DEPENDS with
> > > =.
> >
> > It looks like there are other classes which could benefit from a
> > similar fix. Maybe it's good to try to standardise and update all of
> > them?
>
> This is kind of like a virus which spreads through the system. If you
> set DEPENDS after an inherit in a recipe it should be "+=".

That's fine too, especially if these kinds of guidelines are both
documented and enforced. We used to have a style guide which covered
this kind of thing, but since it's not enforced it's now mostly
ignored...

> I'd much
> rather classes just did += too and we save appends and so on for where
> they're really needed as they're hard to override.
>
> The alternative is to iterate over the system changing more and more +=
> -> append and end up making += pointless :/.
>
> Cheers,
>
> Richard
>
>
>

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

end of thread, other threads:[~2020-11-06  2:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 12:12 [PATCH 1/3] json-glib: use PACKAGECONFIG for tests Ross Burton
2020-11-04 12:12 ` [PATCH 2/3] json-glib: update patch status Ross Burton
2020-11-04 12:12 ` [PATCH 3/3] setuptools3: use DEPENDS_append instead of += Ross Burton
2020-11-04 13:15   ` [OE-core] " Robert P. J. Day
2020-11-04 19:48   ` Andre McCurdy
2020-11-05 23:30     ` Richard Purdie
2020-11-06  2:32       ` Andre McCurdy

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.