Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 217070
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage Utilities Team <tools-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: roger <rogerx@sdf.lonestar.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 217070 depends on: Show dependency tree
Bug 217070 blocks: 170220
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-04-09 23:28 0000
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 From roger 2008-04-11 17:46:32 0000 -------
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 From roger 2008-04-11 18:01:19 0000 -------
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 From Paul Varner 2008-04-25 15:13:29 0000 -------
Reopen, I'm enhancing equery check to check all installed packages if no
package specification is given in the command line. 

------- Comment #4 From Paul Varner 2008-04-25 15:49:06 0000 -------
$ 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 From roger 2008-04-26 00:07:51 0000 -------
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 From Paul Varner 2008-04-26 00:16:45 0000 -------
(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 From Paul Varner 2008-07-10 16:47:41 0000 -------
Released in gentoolkit-0.2.4_rc5.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug