I use Alpine Linux 3.9.3 x86_64
when I issue:
# apk upgrade
the output is:
3 errors; 1973 MiB in 519 packages
How can I get the details about those 3 errors? I tried the --verbose
flag but result is same.
These are the workarounds I thought would work:
apk -sv fix
-s
(or --simulate
) should simulate the fix without doing it and -v
(or --verbose
) should show more details but neither is working.
The result is:
# apk -sv fix
(1/3) Reinstalling fuse-common (3.2.6-r1)
(2/3) Reinstalling fuse-openrc (3.2.6-r1)
(3/3) Reinstalling xorgproto (2018.4-r0)
3 errors; 524 packages, 2845 dirs, 48016 files, 2002 MiB
But still no details, just a short summary. I wish to know what's wrong and I can't find any logs or something like that.
Best Answer
I have run into the same issues and tried to read the source code in order to find out the way of displaying error details. Unfortunately, I think there is no way by
apk
CLI.But...
In src/commit.c#L357-L374, It seems like the numeric errors in the output is stored in variable
errors
. for example3 errors; 1973 MiB in 519 packages
.In src/commit.c#L326-L342, The
errors
is increased whenbroken_files
orbroken_scripts
of ipkg (which refer to installed package) is evaluated to true. So there is a change for us to distinguish that.After reading code in src/database.c#L874-L885, It shows there is a database file stores information of installed package, and it has undocumented character field
f
which indicates the error type thatwe we would like to know.Proof of Concept
The package
fontconfig
andgdk-pixbuf
both has a broken script (f:s
).