Gentoo Archives: gentoo-portage-dev

From: Michael Lienhardt <michael.lienhardt@×××××××.net>
To: Zac Medico <zmedico@g.o>, gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] erroneous behavior in 2-style USE dependencies?
Date: Tue, 16 Jun 2020 23:38:52
Message-Id: 5978fc09-e4ff-03d3-366e-e5f653b2f5c2@laposte.net
In Reply to: Re: [gentoo-portage-dev] erroneous behavior in 2-style USE dependencies? by Zac Medico
1 On 6/16/20 9:31 PM, Zac Medico wrote:
2 > On 6/16/20 11:07 PM, Michael Lienhardt wrote:
3 >> I'm sorry, my client didn't allow to send plain text email anymore...
4 >>
5 >> So, here is my original email.
6 >>
7 >> Dear all,
8 >>
9 >> 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),
10 >> since 'static-libs' is not a use flags of sys-fs/udev-242, that cpv is silently not considered during dependency solving by emerge.
11 >> However, the PMS states:
12 >> - 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
13 >> - 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
14 >> And 'static-libs' is not in the IUSE_EFFECTIVE of sys-fs/udev-242 (that ebuild has EAPI=6).
15 >> So it seems to me that this current behavior of emerge should be considered an error, no? Or the PMS should be updated?
16 >>
17 >> 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)?
18
19 > It's valid as a 4-style dependency with use-dep-defaults.
20
21 I know. Except that in virtual/libgudev-215-r3.ebuild we have in the DEPEND:
22 >=sys-fs/udev-208-r1:0/0[${MULTILIB_USEDEP},gudev(-),introspection(-)?,static-libs?]
23 It is a 2-style dependency (following the PMS).
24
25 I checked with 3 dummy packages
26
27 1. app-misc/dummy-master-1
28 EAPI=6
29 SLOT=0
30 KEYWORDS="amd64"
31 IUSE="static-libs"
32 DEPEND=">=app-misc/dummy-slave-1[static-libs?]"
33 #DEPEND="=app-misc/dummy-slave-1[static-libs?]"
34
35 2. app-misc/dummy-slave-1
36 EAPI=6
37 SLOT=0
38 KEYWORDS="amd64"
39 IUSE=""
40 DEPEND=""
41
42 3. app-misc/dummy-slave-2
43 EAPI=6
44 SLOT=0
45 KEYWORDS="amd64"
46 IUSE="static-libs"
47 DEPEND=""
48
49 With the first version of DEPEND, emerge succeed:
50 # emerge -pv app-misc/dummy-master
51
52 These are the packages that would be merged, in order:
53
54 Calculating dependencies... done!
55 [ebuild N ] app-misc/dummy-slave-2::gentoo USE="-static-libs" 0 KiB
56 [ebuild N ] app-misc/dummy-master-1::gentoo USE="-static-libs" 0 KiB
57
58
59 With the second version of DEPEND, emerge fails:
60 # emerge -pv app-misc/dummy-master
61
62 These are the packages that would be merged, in order:
63
64 Calculating dependencies... done!
65
66 emerge: there are no ebuilds built with USE flags to satisfy "=app-misc/dummy-slave-1[static-libs?]".
67 !!! One of the following packages is required to complete your request:
68 - app-misc/dummy-slave-1::gentoo (Missing IUSE: static-libs)
69 (dependency required by "app-misc/dummy-master-1::gentoo" [ebuild])
70 (dependency required by "app-misc/dummy-master" [argument])
71
72
73
74 Michael

Replies