All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict
@ 2023-12-05  1:41 changqing.li
  2023-12-05 11:35 ` [OE-core] " Alexandre Belloni
  2023-12-05 11:47 ` Ross Burton
  0 siblings, 2 replies; 5+ messages in thread
From: changqing.li @ 2023-12-05  1:41 UTC (permalink / raw)
  To: openembedded-core

From: Changqing Li <changqing.li@windriver.com>

To fix:

Error: Transaction test error:
  file /usr/share/man/man3/crypt.3 from install of
  libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package
  man-pages-6.04-r0.x86_64

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-core/libxcrypt/libxcrypt.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
index ba93d91aef..fe90ef4762 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt.inc
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=c0a30e2b1502c55a7f37e412cd6c6a4b \
                     file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
                     "
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig update-alternatives
 
 SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https"
 SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf"
@@ -26,4 +26,9 @@ CPPFLAGS:append:class-nativesdk = " -Wno-error"
 API = "--disable-obsolete-api"
 EXTRA_OECONF += "${API}"
 
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE:${PN}-doc = "crypt.3 crypt_r.3"
+ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3"
+ALTERNATIVE_LINK_NAME[crypt_r.2] = "${mandir}/man3/crypt_r.3"
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1



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

* Re: [OE-core] [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict
  2023-12-05  1:41 [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict changqing.li
@ 2023-12-05 11:35 ` Alexandre Belloni
  2023-12-05 11:47 ` Ross Burton
  1 sibling, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2023-12-05 11:35 UTC (permalink / raw)
  To: Changqing Li; +Cc: openembedded-core

This causes:

stdio: WARNING: libxcrypt-4.4.36-r0 do_package: libxcrypt: alternative target (/usr/bin/crypt_r.3 or /usr/bin/crypt_r.3.libxcrypt) does not exist, skipping...
stdio: WARNING: libxcrypt-4.4.36-r0 do_package: libxcrypt: NOT adding alternative provide /usr/bin/crypt_r.3: /usr/bin/crypt_r.3.libxcrypt does not exist
stdio: WARNING: libxcrypt-4.4.36-r0 do_package: libxcrypt: alt_link == alt_target: /usr/bin/crypt_r.3 == /usr/bin/crypt_r.3

On 05/12/2023 09:41:55+0800, Changqing Li wrote:
> From: Changqing Li <changqing.li@windriver.com>
> 
> To fix:
> 
> Error: Transaction test error:
>   file /usr/share/man/man3/crypt.3 from install of
>   libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package
>   man-pages-6.04-r0.x86_64
> 
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  meta/recipes-core/libxcrypt/libxcrypt.inc | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
> index ba93d91aef..fe90ef4762 100644
> --- a/meta/recipes-core/libxcrypt/libxcrypt.inc
> +++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=c0a30e2b1502c55a7f37e412cd6c6a4b \
>                      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
>                      "
>  
> -inherit autotools pkgconfig
> +inherit autotools pkgconfig update-alternatives
>  
>  SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https"
>  SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf"
> @@ -26,4 +26,9 @@ CPPFLAGS:append:class-nativesdk = " -Wno-error"
>  API = "--disable-obsolete-api"
>  EXTRA_OECONF += "${API}"
>  
> +ALTERNATIVE_PRIORITY = "90"
> +ALTERNATIVE:${PN}-doc = "crypt.3 crypt_r.3"
> +ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3"
> +ALTERNATIVE_LINK_NAME[crypt_r.2] = "${mandir}/man3/crypt_r.3"
> +
>  BBCLASSEXTEND = "native nativesdk"
> -- 
> 2.25.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#191771): https://lists.openembedded.org/g/openembedded-core/message/191771
> Mute This Topic: https://lists.openembedded.org/mt/102984309/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

* Re: [OE-core] [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict
  2023-12-05  1:41 [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict changqing.li
  2023-12-05 11:35 ` [OE-core] " Alexandre Belloni
@ 2023-12-05 11:47 ` Ross Burton
  2023-12-05 18:27   ` Khem Raj
  1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2023-12-05 11:47 UTC (permalink / raw)
  To: Changqing Li; +Cc: openembedded-core@lists.openembedded.org

On 5 Dec 2023, at 01:41, Changqing Li via lists.openembedded.org <changqing.li=eng.windriver.com@lists.openembedded.org> wrote:
> 
> From: Changqing Li <changqing.li@windriver.com>
> 
> To fix:
> 
> Error: Transaction test error:
>  file /usr/share/man/man3/crypt.3 from install of
>  libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package
>  man-pages-6.04-r0.x86_64

This feels like the wrong solution.  It feels like one of these packages has the “better” documentation and that should be the one that ships the documentation.

Ross

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

* Re: [OE-core] [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict
  2023-12-05 11:47 ` Ross Burton
@ 2023-12-05 18:27   ` Khem Raj
  2023-12-06  5:33     ` Changqing Li
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2023-12-05 18:27 UTC (permalink / raw)
  To: Ross Burton; +Cc: Changqing Li, openembedded-core@lists.openembedded.org

On Tue, Dec 5, 2023 at 3:48 AM Ross Burton <ross.burton@arm.com> wrote:
>
> On 5 Dec 2023, at 01:41, Changqing Li via lists.openembedded.org <changqing.li=eng.windriver.com@lists.openembedded.org> wrote:
> >
> > From: Changqing Li <changqing.li@windriver.com>
> >
> > To fix:
> >
> > Error: Transaction test error:
> >  file /usr/share/man/man3/crypt.3 from install of
> >  libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package
> >  man-pages-6.04-r0.x86_64
>
> This feels like the wrong solution.  It feels like one of these packages has the “better” documentation and that should be the one that ships the documentation.

right, I think these should be deleted from man-pages recipe, I think
there could be more such conflicts with
man-pages especially from glibc recipe.

>
> Ross
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#191816): https://lists.openembedded.org/g/openembedded-core/message/191816
> Mute This Topic: https://lists.openembedded.org/mt/102984309/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict
  2023-12-05 18:27   ` Khem Raj
@ 2023-12-06  5:33     ` Changqing Li
  0 siblings, 0 replies; 5+ messages in thread
From: Changqing Li @ 2023-12-06  5:33 UTC (permalink / raw)
  To: Khem Raj, Ross Burton
  Cc: Changqing Li, openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]


On 12/6/23 02:27, Khem Raj wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, Dec 5, 2023 at 3:48 AM Ross Burton<ross.burton@arm.com>  wrote:
>> On 5 Dec 2023, at 01:41, Changqing Li via lists.openembedded.org<changqing.li=eng.windriver.com@lists.openembedded.org>  wrote:
>>> From: Changqing Li<changqing.li@windriver.com>
>>>
>>> To fix:
>>>
>>> Error: Transaction test error:
>>>   file /usr/share/man/man3/crypt.3 from install of
>>>   libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package
>>>   man-pages-6.04-r0.x86_64
>> This feels like the wrong solution.  It feels like one of these packages has the “better” documentation and that should be the one that ships the documentation.
> right, I think these should be deleted from man-pages recipe, I think
> there could be more such conflicts with
> man-pages especially from glibc recipe.

In old version of man-pages's README,  it mentioned:

Note that sometimes these pages are duplicates of pages also distributed 
in other
packages. Be careful not to overwrite more up-to-date versions.

So we set man-pages to lower priority,  so the doc in the related 
packages are used.


And if we delete them from man-pages recipes, it will make man-pages 
missing these docs

when eg: libcrypt-doc is not installed.

in man-pages recipe, ALTERNATIVE_PRIORITY set to 100. So I send an V2 to 
update

ALTERNATIVE_PRIORITY of libcrypt-doc to 200.

Regards

Changqing

>> Ross
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#191816):https://lists.openembedded.org/g/openembedded-core/message/191816
>> Mute This Topic:https://lists.openembedded.org/mt/102984309/1997914
>> Group Owner:openembedded-core+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>

[-- Attachment #2: Type: text/html, Size: 4288 bytes --]

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

end of thread, other threads:[~2023-12-06  5:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05  1:41 [PATCH] libxcrypt.inc: use alternatives to resolve crypt.3 conflict changqing.li
2023-12-05 11:35 ` [OE-core] " Alexandre Belloni
2023-12-05 11:47 ` Ross Burton
2023-12-05 18:27   ` Khem Raj
2023-12-06  5:33     ` Changqing Li

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.