Commit Graph

16 Commits

Author SHA1 Message Date
Krzesimir Nowak
45faa790cc pkg-auto: Fix occurences generation
Occurences file shows where the package name shows up in the
repository. It tries to be smart, so that checking for sys-devel/gcc
will not be showing sys-devel/gcc-config. But the smart check was
flawed as it ignored the forms like sys-devel/gcc-${PV}. Noticed when
trying to check occurences for sys-libs/libsepol and there were not
enough occurences shown.
2025-05-09 09:24:10 +02:00
Krzesimir Nowak
4bb175152f pkg-auto: Mark in-rootfs sysexts as sysexts in reports
They were showing up as "docker" or "containerd" in the reports, which
is confusing. "sysext-docker" or "sysext-containerd" makes it clear.
2025-04-30 12:45:01 +02:00
Krzesimir Nowak
ecd24bd5eb pkg-auto: Fix a shellcheck warning 2025-04-29 09:43:21 +02:00
Krzesimir Nowak
0d06b737ac pkg-auto: Disable shellcheck reference warnings
Two warnings, SC2034 and SC2178, pop up very often with the references
- shellcheck handles them poorly and produces a ton of bogus warnings
about them. Silence the warnings and drop most of the "shellcheck
disable" clauses.
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
296efcdb22 pkg-auto: Add a setup for shellcheck's "source" checking
That way shellcheck sources some prepared files and learns about some
variables the sourced files define. Thanks to that, we can remove some
of the "shellcheck disable" clauses.
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
13e84333b8 pkg-auto: Add md5-metadata cache diff reports to package reports 2025-04-29 09:43:21 +02:00
Krzesimir Nowak
7c9c2dfea4 pkg-auto: Fix some reference variable names
I'm trying to follow a convention where reference variable names end
with "_ref".
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
e1a4d8e5a9 pkg-auto: Move debugging stuff to a separate file
I'll use it also in new libraries.
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
fff6bd78b2 pkg-auto: Move regular expression for package name to gentoo_ver
I did it initially, because I think I'll use this expression in other
place too. In the end I didn't but I still think it's a better place
for it.
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
80d12ea75f pkg-auto: Rework reports generation
Reports generation used to be executed four times. The number of runs
was a result of cartesian product of two sets - old and new state, and
of amd64 and arm64 architectures. It was pretty much a slow process
because egencache was called implicitly four times, and it was running
in a single-threaded fashion, and also SDK reports were duplicated
(they were the same for old-amd64 and old-arm64, and the same for
new-amd64 and new-arm64 runs).

This changes the generation, so it is being run only two times - once
for old state and once for new state. Every run generates SDK packages
reports and per-architecture board packages reports. Egencache will
now utilize more threads too.
2025-04-29 09:43:21 +02:00
Krzesimir Nowak
00572476c4 pkg-auto: Simplify SDK image override handling
There used to be a possibility to override used SDK image per
architecture, but the need for it disappeared once SDK images started
to contain the initial form of board rootfs for both amd64 and
arm64. This eliminated problems with cyclic dependencies errors
popping up while gather the package reports. So with this change it is
now only possible to specify just one SDK image to use for any
arch. This feature is not used all that often anyway.
2025-04-29 09:43:20 +02:00
Krzesimir Nowak
cfd6a4057b pkg-auto: Move sets_split to util.sh
This will be used in other places, so make it available without
importing the big pkg_auto_lib.sh file.
2025-04-29 09:43:20 +02:00
Krzesimir Nowak
0ba6b62bf0 pkg-auto: Disable pager when printing package occurences 2025-02-06 13:45:28 +01:00
Krzesimir Nowak
04b78d9657 pkg-auto: Address shellcheck complaints 2024-11-27 17:17:58 +01:00
Krzesimir Nowak
dd09caba17 pkg-auto: Import a stripped-down version of eapi7-ver.eclass into impl
The eclass was removed from Gentoo, so we followed suit. This broke
the pkg-auto code. Thus I imported the eclass into the impl directory
as gentoo_ver.sh, threw away all the unnecessary parts and moved some
from pkg_auto_lib.sh to the new file.

This allowed me to also drop a hack where I was grepping for the
version regexp in the eclass. Now I'm just exporting it.
2024-11-27 16:00:58 +01:00
Krzesimir Nowak
4c5e550055 pkg-auto: Add package automation scripts
This adds some scripts I have been using for over a year to deal with
the weekly package updates.

It comes with a `README.md` which describes a workflow similar to my
own.

The `sync_packages.sh` and `update_packages.sh` scripts are currently
not used anywhere. The idea behind them was to use them for Github
Action, but that will come as a follow-up PR.
2024-11-27 16:00:57 +01:00