On Mon, 2022-05-16 at 19:37 +0200, Markus Walter wrote:
> Hello all,
> is it possible to do the following: after fetching a distfile portage runs
> an external normaliser program specified in an ebuild before checking the
> hash?
> My use case is the following: I would like to improve the gs-elpa program
> and provide a precomputed overlay for melpa. However the melpa distfiles are
> rebuilt everyday and cause checksum failures. However the only thing
> changing are the timestamps. Hence if a normaliser program could simply set
> all timestamps to some predefined value (say 1.1.1970) then this problem
> should vanish.

This would require a new EAPI.  We don't really want more Portage-
specific hacks that are going to break for everyone not using Portage or
the very specific Portage version.

I'm not saying that it's not doable but I'm not convinced the added
complexity is really worth the effort, especially given that this looks
like a very special corner case.  In the end, fixing Melpa is the right
thing to do.

For a start, you'd have to ensure that the "normalizer script" (or its
dependencies, if you put it in the repo) is available at the time of
fetching.  This pretty much goes back to the problem of "fetch
dependencies", and requires a major design change in Portage that
reduces separation between fetching and installing that we have now.
I mean, right now Portage pretty much assumes that you can do
a `--fetchonly` with no extra packages necessary.

The "normalizer" wouldn't be trivial either.  In the end, we're talking
about getting 100% consistent results on all platforms, over
a reasonably long timeframe.

Best regards,
Michał Górny

Reply via email to