Hi Guixers,
We keep accidentally creating world rebuilds because `guix refresh -l`
does not list inherited packages and their dependents.
For example, e4744b12e47ae87189fe43a000955c3549716fec changes an input
of `python-dbusmock`. This change could go directly into master because
according to `guix refresh -l python-dbusmock`, only "84 dependent
packages are rebuilt". But `python-dbusmock-for-tests` inherits from
`python-dbusmock`, and that package has over 4500 dependents, including
heavyweights like `qtwebengine`.
I decided to fix the problem while I was waiting for `qtwebengine` to
compile. This is a first attempt, but I never made changes at this
depth of Guix before, so I'd like your thoughts about whether this is a
sensible approach before finishing it. E.g. there are no tests yet,
the commit message is wrong, and it should also work the other way
around in `(list-transitive)`.
The problem was that nothing tracked whether one package inherits from
another once everything is loaded into memory (only in the scheme
files). So there was nothing `guix refresh -l` could query to find
dependents. I tried to do the simplest thing I could think of, and
added a property to the inheriting package called `parent-name` with the
name of the parent package. It only works with `(package/inherit)`
though, but I understood we should use that anyway.
See https://codeberg.org/guix/guix/pulls/6990
WDYT?
Hugo
(And by now `qtwebengine` is at 89%, but some commit changed the
derivation again...)
(I can see a paper headline for the start of next month: "Guix
developers caused so many accidental world rebuilds, that one of their
package hashes turned out to be a valid bitcoin block hash!")