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.
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.
This adds an explicit generation of md5-metadata cache before any we
do any emerge invocations. That way we can have a copy of reports even
if emerge fails for some reason. But mostly the reason for this
copying is to consume the data later, outside the SDK container.
Declaring structs differs a bit from declaring typical variables in
that it takes one initializer and applies it to all the declared
variables.
Will be used a lot by upcoming libraries.
Some upcoming libraries will use this for their global variables. The
function is using a single counter, which ensures that the generated
names will be globally unique.
It's from Gentoo commit 7158bcf1dca8775e2614ed826c69fa538dc79b86. It
fixes a nasty segfault issue affecting Docker and more.
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Mostly making sure that doing replacements is safe for repeated
sourcing of the hook file, so we won't end up with a situation where a
function foo is calling itself infinitely.
Other than that, making sure that install masks are also added to
PKG_INSTALL_MASK for binary packages.
Also fixed redefining strip function in sys-libs/glibc.
Moved one function from profile.bashrc to sys-apps/policycoreutils, so
it isn't executed for every package.