[1/2] update-alternatives: Do not add dependency on virtual/update-alternatives for INHIBIT_DEFAULT_DEPS

Submitted by Khem Raj on Sept. 1, 2020, 4:56 a.m. | Patch ID: 175856

Details

Message ID 20200901045630.1753967-1-raj.khem@gmail.com
State Master Next
Commit de352280096671dc4e003bea7b848679a2a0e3a3
Headers show

Commit Message

Khem Raj Sept. 1, 2020, 4:56 a.m.
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(-)

Patch hide | download patch | download mbox

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

Comments

Richard Purdie Sept. 1, 2020, 3:37 p.m.
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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#142070): https://lists.openembedded.org/g/openembedded-core/message/142070
Mute This Topic: https://lists.openembedded.org/mt/76550482/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-