Skip to content

checkapk: Check how many packages depend on a previous soname

Sören Tempel requested to merge nmeum/abuild:soname-check-depends into master

Since the changeset committed by psykose a while ago in commit 26118d49 we now extract the previous soname. We can pass this previous soname to apk search -R to figure out how many packages are linked against this old soname. I believe this to be useful for reviewing MRs since the checkapk output will directly tell us if a contributor has missed rebuilds. It will also inform us when no rebuilds are necessary, e.g. if the SONAME was changed but no packages is linked against the library.

Example output for main/libsodium:

>>> Size difference for libsodium: 336 KiB -> 340 KiB
--- filelist-libsodium-old      2023-09-22 11:24:54.799204225 +0200
+++ filelist-libsodium-new      2023-09-22 11:24:54.799204225 +0200
@@ -1,5 +1,5 @@
 .PKGINFO
 usr/
 usr/lib/
-usr/lib/libsodium.so.23
-usr/lib/libsodium.so.23.3.0
+usr/lib/libsodium.so.26
+usr/lib/libsodium.so.26.1.0
SODIFF:
-usr/lib/libsodium.so.23.3.0:    SONAME               libsodium.so.23
+usr/lib/libsodium.so.26.1.0:    SONAME               libsodium.so.26
REBUILDS:
*** 36 packages linked against 'libsodium.so.23' need to be rebuild!

I think this might be a good addition to the SODIFF output, this is just a suggestion though if others believe the SODIFF output to be enough then we don't need to merge this :)

Merge request reports