All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS
@ 2020-09-01  4:56 Khem Raj
  2020-09-01  4:56 ` [PATCH 2/2] glibc-utils: Use update-alternatives for iconv and getconf Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Khem Raj @ 2020-09-01  4:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

This allows special recipes e.g. glibc to use update-alternatives,
glibc-utils e.g. provides packages like iconv, getconf which are also
provided by other packages e.g. toybox, which uses update-alternatives
but since glibc-utils does not use it, images which contain glibc-utils
and toybox fail to build, glibc-utils is commonly pulled into ptest
related images. This patch therefore will allow glibc-utils or
musl-utils use u-a

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/update-alternatives.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 8c2b66e7f1..ae393770f8 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -86,7 +86,7 @@ def gen_updatealternativesvardeps(d):
                 d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
 
 def ua_extend_depends(d):
-    if not 'virtual/update-alternatives' in d.getVar('PROVIDES'):
+    if not 'virtual/update-alternatives' in d.getVar('PROVIDES') and not d.getVar('INHIBIT_DEFAULT_DEPS'):
         d.appendVar('DEPENDS', ' virtual/${MLPREFIX}update-alternatives')
 
 def update_alternatives_enabled(d):
-- 
2.28.0


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

* [PATCH 2/2] glibc-utils: Use update-alternatives for iconv and getconf
  2020-09-01  4:56 [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Khem Raj
@ 2020-09-01  4:56 ` Khem Raj
  2020-09-01  5:03 ` ✗ patchtest: failure for "update-alternatives: Do not ad..." and 1 more Patchwork
  2020-09-01 15:37 ` [OE-core] [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2020-09-01  4:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

iconv/getconf utilities can be provided by other packages e.g. toybox,
therefore this adjusts the policy to accomodate images containing
glibc-utils + toybox

ignoring build-deps in build QA helps to avoid build time QA where it
complains about missing dep for rdep which is added by
update-alternatives bbclass, This will not fail a build since we use
update-alternatives-native during build, and at runtime if we are using
u-a then it will be built and added by image and also other packages
using u-a

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 5f1ab60dc6..04fa3dc602 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -65,7 +65,7 @@ DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconv, loc
 DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
 DESCRIPTION_tzcode = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
 
-inherit multilib_header
+inherit multilib_header update-alternatives
 
 do_install() {
 	oe_runmake install_root=${D} install
@@ -284,3 +284,10 @@ CONFFILES_nscd="${sysconfdir}/nscd.conf"
 
 SYSTEMD_PACKAGES = "nscd"
 SYSTEMD_SERVICE_nscd = "nscd.service"
+
+ALTERNATIVE_${PN}-utils = "getconf iconv"
+ALTERNATIVE_LINK_NAME[getconf] = "${bindir}/getconf"
+ALTERNATIVE_LINK_NAME[iconv] = "${bindir}/iconv"
+
+INSANE_SKIP_${PN}-utils += "build-deps"
+
-- 
2.28.0


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

* ✗ patchtest: failure for "update-alternatives: Do not ad..." and 1 more
  2020-09-01  4:56 [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Khem Raj
  2020-09-01  4:56 ` [PATCH 2/2] glibc-utils: Use update-alternatives for iconv and getconf Khem Raj
@ 2020-09-01  5:03 ` Patchwork
  2020-09-01 15:37 ` [OE-core] [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2020-09-01  5:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

== Series Details ==

Series: "update-alternatives: Do not ad..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/25879/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS
 Issue             Commit shortlog is too long [test_shortlog_length] 
  Suggested fix    Edit shortlog so that it is 90 characters or less (currently 98 characters)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe


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

* Re: [OE-core] [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS
  2020-09-01  4:56 [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Khem Raj
  2020-09-01  4:56 ` [PATCH 2/2] glibc-utils: Use update-alternatives for iconv and getconf Khem Raj
  2020-09-01  5:03 ` ✗ patchtest: failure for "update-alternatives: Do not ad..." and 1 more Patchwork
@ 2020-09-01 15:37 ` Richard Purdie
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2020-09-01 15:37 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Mon, 2020-08-31 at 21:56 -0700, Khem Raj wrote:
> This allows special recipes e.g. glibc to use update-alternatives,
> glibc-utils e.g. provides packages like iconv, getconf which are also
> provided by other packages e.g. toybox, which uses update-alternatives
> but since glibc-utils does not use it, images which contain glibc-utils
> and toybox fail to build, glibc-utils is commonly pulled into ptest
> related images. This patch therefore will allow glibc-utils or
> musl-utils use u-a
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/update-alternatives.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
> index 8c2b66e7f1..ae393770f8 100644
> --- a/meta/classes/update-alternatives.bbclass
> +++ b/meta/classes/update-alternatives.bbclass
> @@ -86,7 +86,7 @@ def gen_updatealternativesvardeps(d):
>                  d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
>  
>  def ua_extend_depends(d):
> -    if not 'virtual/update-alternatives' in d.getVar('PROVIDES'):
> +    if not 'virtual/update-alternatives' in d.getVar('PROVIDES') and not d.getVar('INHIBIT_DEFAULT_DEPS'):
>          d.appendVar('DEPENDS', ' virtual/${MLPREFIX}update-alternatives')
>  

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/2408

(failure in step6b looks related to this)

Cheers,

Richard


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

end of thread, other threads:[~2020-09-01 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01  4:56 [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Khem Raj
2020-09-01  4:56 ` [PATCH 2/2] glibc-utils: Use update-alternatives for iconv and getconf Khem Raj
2020-09-01  5:03 ` ✗ patchtest: failure for "update-alternatives: Do not ad..." and 1 more Patchwork
2020-09-01 15:37 ` [OE-core] [PATCH 1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS Richard Purdie

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.