Hi Phong, I think I've faced the same situation a while ago; there is no common practice or documented process on how to refresh a packages in bulk (or I'm aware of).
It become a crucial to have such a policy or mechanics - migration
to Python 3.12 just revealed that fact that Guix accumulates artifacts:
never updated, dated, not compatible with higher versions packages and
package version variants just make situation even worse.
Splitting package collection looks like an heavy duty task especially to
keep it stable for a long run.
Some practical solution I found 2y ago is to have graph stats calculated
first, count all visible packages with basic metrics per each package
[1], [2]:
- module-file-name :: where the package is located
- build-system-name :: useful to group while larger moves
- package-name ::
- package-guix-version :: package current version in Guix
- package-upstream-version :: (not implemented) current Upstream version
- all-inputs-count :: sum of native-inputs, inputs and propagated-inputs
- dependents-count :: output of "guix refresh --list-dependent"
- affect-ratio :: (round (* (/ dependents-count packages-count) 100) 5);
e.g. 6.57797 is quite high impact or 60.93001
more than a 1/2 of all.
I've never run it for the whole collection but only for some portion of
it during go-team, python-team and science-team refresh sprint, and keep
produced stats files for the farther calculation [3], [4], [5].
From [4]:
Tiers manifest files are to help planing packages update in advance.
1-3 :: Packages with high impact ratio and mainly updated on the
python-team branch.
4 :: Packages with high number of inputs, building which ensure the
health of large portion of the graph.
5 :: All leaf packages which safe to update directly on master branch.
Having stats aside would help to plan what to update where (and produce
dynamic manifest files), the only difficulties I currently facing is
amount of time to calculate it; for the python-team packages it takes
about 1-1.5h for 4000 packages.
If we may have this built-in to Guix it would be supper helpful ^.^ e.g.
guix refresh --show-stats
But I'm doubt it can be faster.
1. [PATCH 0/1] teams: Add packages stats script.
<https://issues.guix.gnu.org/issue/74268>
2. etc: Add teams-packages-stats script.
<https://codeberg.org/guix/guix/pulls/7197>
3. Python for Science: Add more package to manifest
<https://codeberg.org/guix/guix/issues/9584>
4. etc: teams/python: Add tiers manifest files.
<https://codeberg.org/guix/guix/pulls/9601>
5. https://codeberg.org/Hellseher/guix-files
---
Thanks,
Oleg
signature.asc
Description: PGP signature
