Re: erroneous behavior in 2-style USE dependencies?

Zac Medico <[email protected]>
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <[email protected]>
On 6/16/20 6:38 PM, Michael Lienhardt wrote:
> 
> 
> On 6/16/20 9:31 PM, Zac Medico wrote:
>> On 6/16/20 11:07 PM, Michael Lienhardt wrote:
>>> I'm sorry, my client didn't allow to send plain text email anymore...
>>>
>>> So, here is my original email.
>>>
>>> Dear all,
>>>
>>> My bad for not noticing it sooner, but when there is a dependency like ">=sys-fs/udev-208-r1:0/0[static-libs?]" (that occurs in virtual/libgudev-215-r3),
>>>  since 'static-libs' is not a use flags of sys-fs/udev-242, that cpv is silently not considered during dependency solving by emerge.
>>> However, the PMS states:
>>>  - it is an error for a use dependency to be applied to an ebuild which does not have the flag in question in IUSE_REFERENCEABLE
>>>  - For EAPIs listed in table 5.4 as not supporting profile defined IUSE injection, IUSE_REFERENCEABLE is equal to the calculated IUSE value. For EAPIs where profile defined IUSE injection is supported, IUSE_REFERENCEABLE is equal to IUSE_EFFECTIVE
>>> And 'static-libs' is not in the IUSE_EFFECTIVE of sys-fs/udev-242 (that ebuild has EAPI=6).
>>> So it seems to me that this current behavior of emerge should be considered an error, no? Or the PMS should be updated?

Yes, according to PMS it's a "error" but emerge has never reported it as
such. Adding an error message to emerge sounds fine to me.

>>> This is related to the tool I'm working on: should my tool allow this behavior, or fail like it is currently doing (I guess the former)?
> 
>> It's valid as a 4-style dependency with use-dep-defaults.

Actually, it doesn't have use-dep-defaults but somehow my brain
associated it with that because you were talking about IUSE.

> I know. Except that in virtual/libgudev-215-r3.ebuild we have in the DEPEND:
>  >=sys-fs/udev-208-r1:0/0[${MULTILIB_USEDEP},gudev(-),introspection(-)?,static-libs?]
> It is a 2-style dependency (following the PMS).
> 
> I checked with 3 dummy packages
> 
> 1. app-misc/dummy-master-1
> EAPI=6
> SLOT=0
> KEYWORDS="amd64"
> IUSE="static-libs"
> DEPEND=">=app-misc/dummy-slave-1[static-libs?]"
> #DEPEND="=app-misc/dummy-slave-1[static-libs?]"
> 
> 2. app-misc/dummy-slave-1
> EAPI=6
> SLOT=0
> KEYWORDS="amd64"
> IUSE=""
> DEPEND=""
> 
> 3. app-misc/dummy-slave-2
> EAPI=6
> SLOT=0
> KEYWORDS="amd64"
> IUSE="static-libs"
> DEPEND=""
> 
> With the first version of DEPEND, emerge succeed:
> # emerge -pv app-misc/dummy-master
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild  N     ] app-misc/dummy-slave-2::gentoo  USE="-static-libs" 0 KiB
> [ebuild  N     ] app-misc/dummy-master-1::gentoo  USE="-static-libs" 0 KiB

This success is expected, yes? Do you suggest to change the behavior
somehow?

> With the second version of DEPEND, emerge fails:
> # emerge -pv app-misc/dummy-master
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> 
> emerge: there are no ebuilds built with USE flags to satisfy "=app-misc/dummy-slave-1[static-libs?]".
> !!! One of the following packages is required to complete your request:
> - app-misc/dummy-slave-1::gentoo (Missing IUSE: static-libs)
> (dependency required by "app-misc/dummy-master-1::gentoo" [ebuild])
> (dependency required by "app-misc/dummy-master" [argument])

This failure is expected, yes? Do you suggest to change the behavior
somehow?
-- 
Thanks,
Zac
signature.asc (application/pgp-signature, 981 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE8OgXaltWzqgSupCu0HX7jBBKPSAFAl7pXOxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEYw
RTgxNzZBNUI1NkNFQTgxMkJBOTBBRUQwNzVGQjhDMTA0QTNEMjAACgkQ0HX7jBBK
PSAtLw//bwWlQ4N57cBGapeSzwlS0iR1Xuq0+52XmQcIQwpJ72N+KHjI05QPkYhU
sn3RteZhV26cRQmYXqRolFY1yEVoU2Z5v12TIcnZqtGBC2/yCShZNVWyLolDx00h
TC4sU0DdATdNjWk+LnaiDXF3wqMHBSuDhidrUgQlqxCa/rmbyUbPtqoknFFkSNQY
eOAORkmCvD0WEWNANHNuGy3jZX18Eg7165ywSN1dcmP93u7GZd0Xcxe/BzjJnrRl
6JX/6omE5pnSIGo/d0/FP0WgT7z029UTX8i5luVFvS3Y//0wzpRyGaF30fuVVYIC
Lud0F58EDwYeO4J4uUUA/Mm5OnREtfGxRPGrkXUXSmYrA1uZ1pg1rPBEJCEAdQmc
KgMNh4Qo2SNbQpvJYngvUn/aoMpvFP2OAoXt8HOlaxp6ORwfaX6qTzHA7zGA7441
/JfhMsC456DCghG3/a64vDIVIySlVm4bWK7XKpMwUUvZNQKL3YM8pzkImyQuI2jv
d5Fi5dFUjp5Ss+4fPjpX6lkrE/0GWI7iEKmO4Os/V6optakjRuCoRcMAxQ44Cznj
BLramJSbBHJsBOVM/O7XtSZjgK8/p6RZ52bf5syHM0Ta78tULrRW07bvqZ30OiME
UmpR4wpzOMxyHEgz91dGvunmmc3U/WLH1tm4tlFyIIit4j3UDfM=
=dNuZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.