Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 721088 - [Future EAPI] Don't export A
Summary: [Future EAPI] Don't export A
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2020-05-05 13:26 UTC by Ulrich Müller
Modified: 2021-06-05 10:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2020-05-05 13:26:22 UTC
Variables exported to the environment are limited to MAX_ARG_STRLEN of Linux, which is 128 KiB. In the case of A this can be a problem for ebuilds with many distfiles.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-05 13:48:41 UTC
We should probably make a clear definitive list of which variables are exported and which are not.  We could also kill A altogether, I suppose it's only needed as a convenience variable for default_src_unpack.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-05 18:37:17 UTC
Let me expand on this.  In my opinion, having A as 'defined but not exported' is against the principle of the least surprise.  This is something people will simply miss or get wrong.  Someone implementing a PM on top of this is most likely not to care much whether A is exported or not, and fall into the same trap.

In the end, changing this doesn't really solve the problem.  It merely shifts the claim from 'ebuild is making unreasonable assumptions' to 'package manager author did not read our fine print'.  The end result is the same -- instead of making it easier to write compatible and reliable PMs, PMS just serves as an excuse to justify whatever implementation Portage achieved after working around hundred of issues.

In my opinion, this isn't worth the effort.  What we should do instead is set a tree policy preventing this issue from happening again.  We can change PMS to indicate that exporting it is *optional* but saying it *must not* be exported is just asking people to stand head down.
Comment 3 Zac Medico gentoo-dev 2020-05-26 04:59:42 UTC
(In reply to Michał Górny from comment #1)
> We could also kill A altogether, I suppose it's
> only needed as a convenience variable for default_src_unpack.

If we specify that DISTDIR is supposed to contain exactly those files which should be unpacked, then that suffices, and allows us to avoid the need to specify an unexported variable.
Comment 4 Ulrich Müller gentoo-dev 2020-05-26 07:05:07 UTC
(In reply to Zac Medico from comment #3)
> (In reply to Michał Górny from comment #1)
> > We could also kill A altogether, I suppose it's
> > only needed as a convenience variable for default_src_unpack.
> 
> If we specify that DISTDIR is supposed to contain exactly those files which
> should be unpacked, then that suffices, and allows us to avoid the need to
> specify an unexported variable.

unpack ${A} is very common and very convenient. So I guess if the package manager won't define A any longer, then ebuilds would either start defining it themselves, or do horrible things like globbing inside ${DISTDIR}.
Comment 5 Ulrich Müller gentoo-dev 2021-06-05 10:10:40 UTC
(In reply to Michał Górny from comment #2)

Closing.