Due to a flaky power brick, my laptop died suddenly amid a large upgrade run (kde-4.10.1 and a few other bits). After reboot, I found that lots of files were present but empty, and that pacman doesn't see them as owned by any package (when I know this is erroneous). I was tipped off to this by ldconfig (when invoked during the subsequent run of pacman -Syu) telling me lots of the KDE libs were empty.
I dealt with all the libs identified there by identifying each one's owner (guesswork, since pacman -Qo returned nothing) and running pacman -Sf for each package.
However, I've got no way of knowing what other files are borked. I just found kdialog also affected, and it looks like some wallpaper images too - KDE starts, but I dread to think what else is missing.
Can anyone suggest how I can fully recover the situation? Many, many thanks in advance.
See the pacman wiki page. You can at least find all files pacman doesn't think it knows about which should be a start. You can also use find to search your disk for empty files.
Hi cfr, thanks for the reply.
Both suggestions helped along, though I think I must have already dealt with most or all of the packages that were in mid-upgrade (or so recently the disk hadn't sync'd yet?) when the crash happened. Here's the list of empy files courtesy of find, with a couple of snips for brevity:
/opt/java/jre/lib/security/trusted.libraries /opt/java/lib/visualvm/platform/.lastModified /opt/java/lib/visualvm/visualvm/.lastModified /opt/java/lib/visualvm/visualvm/config/Modules/org-openide-options.xml_hidden --- ~10 more like the above --- /opt/java/lib/visualvm/profiler/.lastModified /var/lib/mysql/mysql/func.MYD --- ~15 more like the above --- /var/lib/pacman/local/xorg-utils-7.6-8/files /var/lib/pacman/local/xorg-server-utils-7.6-3/files /var/lib/pacman/local/xorg-font-utils-7.6-3/files /var/lib/udisks/mtab /var/log/crond.log.3 /var/log/btmp.1 /var/log/btmp /var/log/acpid.log.3 /var/log/wicd/wicd.log /var/log/cups/error_log /var/log/cups/page_log /var/log/cups/access_log /usr/share/X11/locale/microsoft-cp1251/Compose --- ~15 more like the above --- /usr/share/pygtk/2.0/defs/gtk-2.22-types.defs /usr/share/pygtk/2.0/defs/gdk-2.24.defs /usr/share/mime/icons /usr/share/cmake-2.8/Modules/IntelVSImplicitPath/hello.f /usr/share/doc/libxslt-python-1.1.26/TODO /usr/share/doc/scribus/ChangeLogSVN /usr/share/doc/libtheora-1.1.1/doxygen-build.stamp /usr/share/doc/libvorbis-1.3.3/doxygen-build.stamp /usr/share/pacman/keyrings/archlinux-revoked /usr/share/apps/plasma/dashboard/AppleClasses/AppleButton.js /usr/share/qt4/mkspecs/qdevice.pri /usr/share/groff/1.22.2/tmac/mm/locale /usr/share/groff/1.22.2/tmac/mm/se_locale /usr/lib/libreoffice/basis3.3/help/en-GB/shared.ht /usr/lib/libreoffice/basis3.3/help/en-GB/shared.key /usr/lib/libreoffice/basis3.3/help/en-GB/shared.db /usr/lib/libreoffice/share/extensions/dict-en/dialog/en_en_US.default /usr/lib/libreoffice/share/config/images_brand.zip /usr/lib/libreoffice/program/libfilterconfiglo.so /usr/lib/libreoffice/program/libtklo.so /usr/lib/libreoffice/program/wizards/document/__init__.py /usr/lib/libreoffice/program/wizards/text/__init__.py /usr/lib/libreoffice/program/wizards/__init__.py /usr/lib/libreoffice/program/wizards/ui/event/__init__.py /usr/lib/libreoffice/program/wizards/ui/__init__.py /usr/lib/libreoffice/program/wizards/common/__init__.py /usr/lib/libreoffice/program/liblnglo.so --- ~20 more like the above --- /usr/lib/libreoffice/help/en-GB/shared.ht /usr/lib/libreoffice/help/en-GB/shared.key /usr/lib/libreoffice/help/en-GB/shared.db /usr/lib/perl5/vendor_perl/auto/XML/Parser/Expat/Expat.bs --- ~50 more like the above --- /usr/lib/python2.7/email/mime/__init__.py --- ~20 more like the above --- /usr/lib/python3.3/test/nullcert.pem /root/mcelog.out /root/.gnupg/pubring.gpg /root/pengi-kernel/boot/.keep /etc/.pwd.lock /etc/odbcinst.ini /etc/odbc.ini /etc/arch-release /etc/motd /etc/cups/subscriptions.conf /etc/cups/classes.conf.O
Most of these seem to (a) make sense to be empty on my system (eg I don't use cups or mysql), or (b) it's plausible that they're meant to be empty for whatever reason (eg the perl .bs files and python __init__.py files, which seem to ALL be empty). The many empty .libs in libreoffice seem odd, but I ran pacman -Sf on all its packages and they remained empty so I assume this is expected.
However, if there's anything else in that list that shouldn't be empty, do please sing out.
Don't use -f! You shouldn't need to force the reinstallation. If you do, there may be something further wrong. Certainly don't do it as routinely.
Are you still having problems? If so, you could try following the wiki instructions for just reinstalling all installed packages. If you had a backup list, you could use that. Otherwise you can hope that pacman's current list is correct (or sufficiently so).
Reason for using -f was that the reinstalls wouldn't work without it, because the orphaned empty files were causing collisions. I guess an alternative would have been to first identify and manually delete all the orphans then reinstall normally, but I didn't see -f as a risk factor. How so?
Everything seems OK now, hopefully the damage was limited to the few packages identified by ldconfig. I've copied the pacman.log section that precedes the crash so I can always reinstall the rest if I see any further issues with the remaining packages.
I think if you checked the conflicts first and that's all it was, probably -f is reasonably safe. But I wouldn't recommend applying it blindly to the list of packages to be reinstalled - just in case.