Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217070 - Equery Check World
Summary: Equery Check World
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2008-04-09 23:28 UTC by Roger
Modified: 2008-07-10 16:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger 2008-04-09 23:28:10 UTC
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?
Comment 1 Roger 2008-04-11 17:46:32 UTC
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?)
Comment 2 Roger 2008-04-11 18:01:19 UTC
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.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-04-25 15:13:29 UTC
Reopen, I'm enhancing equery check to check all installed packages if no package specification is given in the command line. 
Comment 4 Paul Varner (RETIRED) gentoo-dev 2008-04-25 15:49:06 UTC
$ 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.
Comment 5 Roger 2008-04-26 00:07:51 UTC
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.)
Comment 6 Paul Varner (RETIRED) gentoo-dev 2008-04-26 00:16:45 UTC
(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 

Comment 7 Paul Varner (RETIRED) gentoo-dev 2008-07-10 16:47:41 UTC
Released in gentoolkit-0.2.4_rc5.