Post transaction "Checking which packages need to be rebuilt" doesn't recognize something needs to be rebult

Hi. I’m not sure if I’m getting this wrong, but I noticed that whenever I do an update, the checkrebuild is triggered by the hook, which is awesome, however it doesn’t show anything to be rebuilt, which is bad, because if I manually run a checkrebuild it does show there are packages need to be rebuilt… (sorry output is in hungarian, but scroll down and you’ll see the third row from the bottom)

λ vajdao@endos ~ $ yay
:: A csomagadatbázisok szinkronizálása...
endeavouros naprakész
core naprakész
 extra                                                                                            7,8 MiB  34,9 MiB/s 00:00 [---------------------------------------------------------------------------] 100%
multilib naprakész
:: Searching AUR for updates...
:: Searching databases for updates...
:: 1 package to upgrade/install.
1  extra/python-pyparsing  3.2.1-1 -> 3.2.2-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> 
Sync Dependency (1): python-pyparsing-3.2.2-1
:: A csomagadatbázisok szinkronizálása...
endeavouros naprakész
core naprakész
extra naprakész
multilib naprakész
:: Teljes rendszerfrissítés indítása...
függőségek feloldása...
ütköző csomagok keresése...

Csomag (1)              Régi verzió  Új verzió  Tiszta változás  Letöltési méret

extra/python-pyparsing  3.2.1-1      3.2.2-1           0,03 MiB         0,22 MiB

Teljes letöltési méret:   0,22 MiB
Teljes telepített méret:  1,32 MiB
Tiszta frissítési méret:  0,03 MiB

:: Kezdődhet a telepítés? [I/n] 
:: Csomagok letöltése...
 python-pyparsing-3.2.2-1-any                                                                   229,5 KiB  2,06 MiB/s 00:00 [---------------------------------------------------------------------------] 100%
(1/1) kulcsok vizsgálata a kulcstartóban                                                                                    [---------------------------------------------------------------------------] 100%
(1/1) csomagok integritásának ellenőrzése                                                                                   [---------------------------------------------------------------------------] 100%
(1/1) csomagfájlok betöltése                                                                                                [---------------------------------------------------------------------------] 100%
(1/1) fájlütközések vizsgálata                                                                                              [---------------------------------------------------------------------------] 100%
:: Tranzakció előtti műveletek végrehajtása...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 312
:: Csomagváltozások feldolgozása...
(1/1) frissítés: python-pyparsing                                                                                           [---------------------------------------------------------------------------] 100%
:: Tranzakció utáni műveletek végrehajtása...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Checking which packages need to be rebuilt
(3/3) Performing snapper post snapshots for the following configurations...
==> root: 313

Then I ran manually checkrebuild -v and as you can see, there are packages to be rebuilt, but previously pacman didn’t warn me about it..

λ vajdao@endos ~ $ checkrebuild -v
foreign brscan4

ldd /opt/brother/scanner/brscan4/brscan_gnetconfig

        libgtk-x11-2.0.so.0 => not found

and checked that file of which package it belongs to.

λ vajdao@endos ~ $ pkgfile libgtk-x11-2.0.so.0
extra/gtk2
multilib/lib32-gtk2

Now, this was just a false positive, because brscan4 only was marked to be rebuilt because gtk2 as an optdepend wasn’t installed, after installing that manually, not even checkrebuild detected anything so all seem clear, but that’s not important right now,- However! On my other machine, there’s python312 installed, which then truly needed a rebuild, and yet again, when I performed a yay upgrade beforehand, pacman didn’t output any message that something needs to be rebuilt, so I wouldn’t know there are packages to be rebuilt, if I wouldn’t have remembered this thread from those times to do it manually

Here’s the untouched hook file, just in case:

λ vajdao@endos ~ $ cat /usr/share/libalpm/hooks/rebuild-detector.hook 
[Trigger]
Operation = Upgrade
Type = Package
Target = *

[Action]
Description = Checking which packages need to be rebuilt
Exec = /usr/bin/checkrebuild
When = PostTransaction
NeedsTargets

So how come pacman doesn’t print out the to be rebuilt packages via the post transaction hook, and only manual intervention is the thing to uncover them? Shouldn’t it list these kind of packages automatically as @dalto said in the forum I linked? Or am I missing the point of this thing?

The man page says this:

For performance reasons, the ldd check is only executed against direct dependencies of the
packages that are being updated in this pacman transaction.

That is probably the difference here.

brscan4 isn’t a direct dependency of the package you updated.

A-ha, that makes sense, thanks dalto.

So in a nutshell, is it always a good idea to manually check with checkrebuild occasionally, or let it be and someday it’s gonna pop up anways when a direct dependecy upgrade occurs?

I’m asking this just because I want to be sure, that the integrity of my system won’t break in the long run, by missing out packages which would need to be rebuilt,- though I’m not sure whether a system could even break by not rebuilding occasionally.

In theory, official repo packages should not need to be rebuilt so it shouldn’t really have a big system integrity issue. Generally, it is just your AUR packages.

Cool, then I’m not gonna stress myself about it, thank you dalts :slight_smile: