public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
@ 2014-06-18 15:10 Ulrich Mueller
  2014-06-18 18:20 ` Ciaran McCreesh
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2014-06-18 15:10 UTC (permalink / raw
  To: gentoo-pms

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

The spec says:

| IUSE_REFERENCEABLE
|     is a variable calculated from IUSE and a variety of other sources
|     described below. It is purely a conceptual variable; it is not
|     exported to the ebuild environment. Values in IUSE_REFERENCEABLE
|     may legally be used in queries from other packages about an
|     ebuild’s state (for example, for use dependencies).
| IUSE_EFFECTIVE
|     is another conceptual, unexported variable. Values in IUSE_
|     EFFECTIVE are those which an ebuild may legally use in queries
|     about itself (for example, for the use function, and for use in
|     dependency specification conditional blocks).
|
| [...]
|
| For EAPIs listed in table 5.2 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.
|
| For EAPIs listed in table 5.2 as not supporting profile defined IUSE
| injection, IUSE_EFFECTIVE contains the following values:
|    * All values in the calculated IUSE value.
|    * All possible values for the ARCH variable.
|    * All legal use flag names whose name starts with the lowercase
|      equivalent of any value in the profile USE_EXPAND variable
|      followed by an underscore.

What we see for the current multilib issue is that for USE_EXPAND
flags, (+) or (-) USE dependency defaults match ebuilds in EAPI 4 and
earlier that don't have the flag in their IUSE.

So the package manager behaves as if IUSE_EFFECTIVE (but not
IUSE_REFERENCEABLE) was used for dependency matching.

Must the spec be corrected, such that it says that IUSE_REFERENCEABLE
is equal to IUSE_EFFECTIVE, for all EAPIs?

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
  2014-06-18 15:10 [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE Ulrich Mueller
@ 2014-06-18 18:20 ` Ciaran McCreesh
  2014-06-18 18:58   ` Ulrich Mueller
  0 siblings, 1 reply; 6+ messages in thread
From: Ciaran McCreesh @ 2014-06-18 18:20 UTC (permalink / raw
  To: gentoo-pms

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

On Wed, 18 Jun 2014 17:10:37 +0200
Ulrich Mueller <ulm@gentoo.org> wrote:
> Must the spec be corrected, such that it says that IUSE_REFERENCEABLE
> is equal to IUSE_EFFECTIVE, for all EAPIs?

The spec is correct, and discusses what you can actually rely upon
working. It is unfortunate that the Council introduced this confusion
by approving "what Portage has implemented" for EAPI 4, without
considering the implications of approving (+) and (-) without the
stricter USE rules.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
  2014-06-18 18:20 ` Ciaran McCreesh
@ 2014-06-18 18:58   ` Ulrich Mueller
  2014-06-18 19:16     ` Ciaran McCreesh
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2014-06-18 18:58 UTC (permalink / raw
  To: gentoo-pms

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

>>>>> On Wed, 18 Jun 2014, Ciaran McCreesh wrote:

> The spec is correct, and discusses what you can actually rely upon
> working. It is unfortunate that the Council introduced this
> confusion by approving "what Portage has implemented" for EAPI 4,
> without considering the implications of approving (+) and (-)
> without the stricter USE rules.

Maybe it becomes clearer if we imagine for the moment that there never
was an EAPI 4.

Take an EAPI 5 ebuild for cat/foo-1 that defines the following
dependency:

   RDEPEND="cat/bar-1[abi_x86_64(-)]"

ABI_X86 is in USE_EXPAND of the profile, also abi_x86_64 is forced
enabled via the profile's use.force.

cat/bar-1 is EAPI 2 and has an empty IUSE.

Now, according to the spec:
| For EAPIs listed in table 5.2 as not supporting profile defined IUSE
| injection, IUSE_REFERENCEABLE is equal to the calculated IUSE value.

So in EAPI 2, IUSE_REFERENCEABLE is equal to IUSE, therefore for bar-1
it should be empty.

Furthermore:
| In a 4-style use dependency, the flag name may immediately be
| followed by a default specified by either (+) or (-). The former
| indicates that, when applying the use dependency to a package that
| does not have the flag in question in IUSE_REFERENCEABLE, the
| package manager shall behave as if the flag were present and
| enabled; the latter, present and disabled. 

In the above RDEPEND, we have a default (-) specifier, and the flag is
not in IUSE_REFERENCEABLE of bar-1. So the PM should behave as if the
flag was disabled, and the dependency should not be matched.

However, what we observe is that the PM behaves as if abi_x86_64 was
in IUSE_REFERENCEABLE, so the dependency _is_ matched.

What am I missing here?

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
  2014-06-18 18:58   ` Ulrich Mueller
@ 2014-06-18 19:16     ` Ciaran McCreesh
  2014-06-18 20:05       ` Ulrich Mueller
  0 siblings, 1 reply; 6+ messages in thread
From: Ciaran McCreesh @ 2014-06-18 19:16 UTC (permalink / raw
  To: gentoo-pms

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

On Wed, 18 Jun 2014 20:58:46 +0200
Ulrich Mueller <ulm@gentoo.org> wrote:
> >>>>> On Wed, 18 Jun 2014, Ciaran McCreesh wrote:
> > The spec is correct, and discusses what you can actually rely upon
> > working. It is unfortunate that the Council introduced this
> > confusion by approving "what Portage has implemented" for EAPI 4,
> > without considering the implications of approving (+) and (-)
> > without the stricter USE rules.
> 
> Maybe it becomes clearer if we imagine for the moment that there never
> was an EAPI 4.

It does: the rule then would be "if you want to use (+) and (-) on a
USE_EXPAND flag, then you may only depend upon packages whose EAPI also
supports (+) and (-)".

> What am I missing here?

In EAPIs before 5, there is no requirement that packages using a
USE_EXPAND flag actually list that flag in IUSE. Some versions of
Portage would do filtering on USE based upon some convoluted scheme
that Zac invented, and some would not. Thus there's not enough
information in VDB to determine whether a "missing" flag is actually
missing.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
  2014-06-18 19:16     ` Ciaran McCreesh
@ 2014-06-18 20:05       ` Ulrich Mueller
  2014-06-18 20:22         ` Ciaran McCreesh
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2014-06-18 20:05 UTC (permalink / raw
  To: gentoo-pms

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

>>>>> On Wed, 18 Jun 2014, Ciaran McCreesh wrote:

> It does: the rule then would be "if you want to use (+) and (-) on a
> USE_EXPAND flag, then you may only depend upon packages whose EAPI
> also supports (+) and (-)".

Maybe we should add an explicit warning then? Something like this:

"Behaviour is undefined if a 4-style default is applied to an ebuild
that has the flag in IUSE_EFFECTIVE but not in IUSE_REFERENCEABLE."

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE
  2014-06-18 20:05       ` Ulrich Mueller
@ 2014-06-18 20:22         ` Ciaran McCreesh
  0 siblings, 0 replies; 6+ messages in thread
From: Ciaran McCreesh @ 2014-06-18 20:22 UTC (permalink / raw
  To: gentoo-pms

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

On Wed, 18 Jun 2014 22:05:26 +0200
Ulrich Mueller <ulm@gentoo.org> wrote:
> >>>>> On Wed, 18 Jun 2014, Ciaran McCreesh wrote:
> > It does: the rule then would be "if you want to use (+) and (-) on a
> > USE_EXPAND flag, then you may only depend upon packages whose EAPI
> > also supports (+) and (-)".
> 
> Maybe we should add an explicit warning then? Something like this:
> 
> "Behaviour is undefined if a 4-style default is applied to an ebuild
> that has the flag in IUSE_EFFECTIVE but not in IUSE_REFERENCEABLE."

Would be better to get repoman to check for it and forbid it.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2014-06-18 20:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 15:10 [gentoo-pms] IUSE_EFFECTIVE and IUSE_REFERENCEABLE Ulrich Mueller
2014-06-18 18:20 ` Ciaran McCreesh
2014-06-18 18:58   ` Ulrich Mueller
2014-06-18 19:16     ` Ciaran McCreesh
2014-06-18 20:05       ` Ulrich Mueller
2014-06-18 20:22         ` Ciaran McCreesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox