Allan McRae [2010.10.22 1028 +1000]:
makepkg uses pacman with the -T flag to test whether a package installed. That is supposed to be dead quiet. Of course if you used the --debug flag you would see the message you are after...
Fair enough. In particular, I can see why printing an error message may cause a mess, for example, in how makepkg uses pacman -T to list unmet dependencies. Nevertheless, if I'm a user (not a developer) who wonders why pacman isn't doing the right thing, the copious output produced by --debug isn't that helpful, especially because I have to infer from "warning: pkgcache is NULL for db 'local'" that pacman in fact cannot read the contents of /var/lib/pacman/local. So, I still think that an informative error message such as "warning: cannot access /var/lib/pacman/local" would be immensely helpful from a user's perspective. As I said, I see why having such an error message produced by pacman -T is a bad idea, but pacman -Qs, instead of outputting nothing, should produce a warning. Cheers, Norbert