Ran into an issue (more then likely, kernel bug with the libsata?) causing massive file corruption & an unsafe shutdown condition. On reboot, missing files prevented the system from fully booting. Although there were one or two missing commands, I obviously suspect more missing somewhere. (See Bug #216990) A quick research showed "equery check pkgspec" would verify the presence of a package files including their integrity. The following quickly created script does this after creating a file listing all installed packages. However, I believe equery should contain a "check world" option. <pre> eix -sI --only-names > /tmp/package.log { while read packagename; do echo $packagename equery check $packagename done } < /tmp/package.log | tee equery-check-world.log</pre> (Another obvious place to pull in a list of world packages is /var/lib/portage/world, but sometimes this list seems incomplete.) From here, a user can grep equery-check-world.log for missing files or the modified "grep -v /etc" files and, finally, gather a list of packages for re-install. Reproducible: Always Expected Results: Or, is this feature already implemented with a different method?
I also need to rebuild packages against the following exceptions: if file status "does not exist" or a file status "has incorrect md5sum" and file status does not contain "/etc" then rebuild package. These two tasks documented here (equery check world && re-emerge packages with bad files) seem quite common. Am I missing something with Google searching or is this feature yet to be implemented (hence, still done by hand)? (As I'm writing a script, I'm also noticing "equery check" returns status 1 on missing files but returns 0 on bad md5sums for files. Shouldn't a different return status be returned for each error type found for a package?)
portage-utils (Written in C) provides qcheck. I believe "qcheck -a" suffices the needs of "equery check world" feature. As far as rebuilding each package with missing files or bad md5sums, I'll work with qcheck as the output is verbose. Closing this bug for now.
Reopen, I'm enhancing equery check to check all installed packages if no package specification is given in the command line.
$ svn commit -m "Enhance equery check to check all installed packages if no package argument is present. (Bug #217070)" Sending equery/equery Transmitting file data . Committed revision 488.
I'm pulling from: cvs -d :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot co gentoo-projects/portage-utils Is there an SVN server? (I'm probably checking out an older snapshot, as to the reason I'm having issues.)
(In reply to comment #5) > I'm pulling from: > cvs -d :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot co > gentoo-projects/portage-utils > > Is there an SVN server? (I'm probably checking out an older snapshot, as to > the reason I'm having issues.) That is the portage-utils repository. The change I made was in equery which is in the gentoolkit repository at: svn co svn://anonsvn.gentoo.org/gentoolkit/trunk
Released in gentoolkit-0.2.4_rc5.