On Sun, May 17, 2020 at 7:44 PM William Hubbs <[email protected]> wrote:
>
> All,
>
> I have been acting as a backup maintainer for dev-vcs/cli. A pull
> request was opened today that changes the way we detect whether the
> ebuild is live from looking for "live" in $PROPERTIES to the version
> number [1].
>
> A different dev referred me to PMS which indicates that ebuilds should
> not rely on $PROPERTIES for anything [2].
That's not what PMS says, and I think you are misinterpreting it.
> I see quite a few ebuilds in the tree checking $FEATURES however, which
> imo is even less reliable since $FEATURES is not specified anywhere in pms
> and the $FEATURES variable is portage-specific.
We don't really support checking FEATURES officially. It's a
last-resort when no better option presents itself.
> I guess I'm looking for consistency. If we are going to allow
> $FEATURES to be checked, should we allow $PROPERTIES to be checked? Or,
> should we ban checking both of them?
Inspecting PROPERTIES is technically fine, but seems fairly useless to
me. Its value is defined in ebuild code, so there's no "new"
information to be gained from it.
The code in dev-vcs/cli is broken: the "has" function takes a value
list as separate arguments, but the ebuild is passing a single string
to it. It is also done inconsistently: On line 10, it checks ${PV} ==
*9999, and then switches to checking ${PROPERTIES} later in the
ebuild. I think it is better to use the same logic in both places.