<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>217070</bug_id>
          
          <creation_ts>2008-04-09 23:28 0000</creation_ts>
          <short_desc>Equery Check World</short_desc>
          <delta_ts>2008-07-10 16:47:41 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Third-Party Tools</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN</keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>170220</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>rogerx@sdf.lonestar.org</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2008-04-09 23:28:10 0000</bug_when>
            <thetext>Ran into an issue (more then likely, kernel bug with the libsata?) causing massive file corruption &amp; 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 &quot;equery check pkgspec&quot; 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 &quot;check world&quot; option.

&lt;pre&gt; eix -sI --only-names &gt; /tmp/package.log

{
while read packagename; do
	echo $packagename
	equery check  $packagename
	done
} &lt; /tmp/package.log | tee equery-check-world.log&lt;/pre&gt;


(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 &quot;grep -v /etc&quot; 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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2008-04-11 17:46:32 0000</bug_when>
            <thetext>I also need to rebuild packages against the following exceptions:

if file status &quot;does not exist&quot;
  or a file status &quot;has incorrect md5sum&quot;
  and file status does not contain &quot;/etc&quot;
  then rebuild package.


These two tasks documented here (equery check world &amp;&amp; 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&apos;m writing a script, I&apos;m also noticing &quot;equery check&quot; returns status 1 on missing files but returns 0 on bad md5sums for files.  Shouldn&apos;t a different return status be returned for each error type found for a package?)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2008-04-11 18:01:19 0000</bug_when>
            <thetext>
portage-utils (Written in C) provides qcheck.

I believe &quot;qcheck -a&quot; suffices the needs of &quot;equery check world&quot; feature.

As far as rebuilding each package with missing files or bad md5sums, I&apos;ll work with qcheck as the output is verbose.

Closing this bug for now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-04-25 15:13:29 0000</bug_when>
            <thetext>Reopen, I&apos;m enhancing equery check to check all installed packages if no package specification is given in the command line. </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-04-25 15:49:06 0000</bug_when>
            <thetext>$ svn commit -m &quot;Enhance equery check to check all installed packages if no package argument is present. (Bug #217070)&quot;
Sending        equery/equery
Transmitting file data .
Committed revision 488.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rogerx@sdf.lonestar.org</who>
            <bug_when>2008-04-26 00:07:51 0000</bug_when>
            <thetext>I&apos;m pulling from:
cvs -d :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot co gentoo-projects/portage-utils

Is there an SVN server?  (I&apos;m probably checking out an older snapshot, as to the reason I&apos;m having issues.)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-04-26 00:16:45 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; I&apos;m pulling from:
&gt; cvs -d :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot co
&gt; gentoo-projects/portage-utils
&gt; 
&gt; Is there an SVN server?  (I&apos;m probably checking out an older snapshot, as to
&gt; the reason I&apos;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 

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-07-10 16:47:41 0000</bug_when>
            <thetext>Released in gentoolkit-0.2.4_rc5.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>