emerge --metadata ran as user, and silenced auxdb Corruption exceptions when doing...
authorBrian Harring <ferringb@gentoo.org>
Sat, 24 Sep 2005 19:13:25 +0000 (19:13 -0000)
committerBrian Harring <ferringb@gentoo.org>
Sat, 24 Sep 2005 19:13:25 +0000 (19:13 -0000)
svn path=/main/branches/2.0/; revision=2025

ChangeLog
bin/emerge
pym/portage.py

index 953c8f25276c9530b274428d2cba5f086fc7f58f..2bb12f09e1fd2a0e3fb0b8ba50164f4a29c3c369 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,15 @@
     2. /var/cache/edb/world is now /var/lib/portage/world.
     3. /etc/portage/profile/virtuals is _USER_ configs only.
 
+  24 Sep 2005; Brian Harring <ferringb@gentoo.org> pym/portage.py, 
+  bin/emerge:
+  Final emerge metadata/cache cleanups; emerge --metadata no longer
+  requires root (we run searches as non root, which can update the cache,
+  so emerge --metadata as root is daft), and silenced auxdb exceptions
+  when doing metadata transfers- preparation for when the default backend
+  is changed.  If that weren't in, user would see > 20,0000 lines of 
+  pointless cruft output.
+
   24 Sep 2005; Brian Harring <ferringb@gentoo.org> pym/portage.py,
   +pym/portage_db_metadata.py, +pym/portage_db_flat_hash.py, 
   pym/portage_db_flat.py, pym/portage_const.py:
index 7f482eed77800a467cf763d1880336882a9e214c..ed5f9ee0afb1c918642d1cb4abbca477d022d782 100755 (executable)
@@ -596,7 +596,7 @@ def help():
        emergehelp.help(myaction,myopts,havecolor)
 
 # check if root user is the current user for the actions where emerge needs this
-if ("--pretend" in myopts) or ("--fetchonly" in myopts or "--fetch-all-uri" in myopts) or (myaction=="search"):
+if ("--pretend" in myopts) or ("--fetchonly" in myopts or "--fetch-all-uri" in myopts) or (myaction=="metadata"):
        if not portage.secpass:
                if portage.wheelgid==portage.portage_gid:
                        print "emerge: wheel group membership required for \"--pretend\" and search."
@@ -612,7 +612,7 @@ elif "--help" in myopts:
        help()
        sys.exit(0)
 elif portage.secpass!=2:
-       if myaction in ["search", "info", "regen"]:
+       if myaction in ["search", "info", "regen", "metadata"]:
                pass
        elif (not myaction) and (not myfiles):
                pass
index 26dd195f2be5af113beb3e007cedf40504e92295..bcaff842cf1e6bc3daf17271900acd63a092d72a 100644 (file)
@@ -5315,7 +5315,8 @@ class portdbapi(dbapi):
                        raise
                except Exception, e:
                        auxdb_is_valid = 0
-                       writemsg("auxdb exception: [%(loc)s]: %(exception)s\n" % {"loc":mylocation+"::"+cat+"/"+pkg, "exception":str(e)})
+                       if not metacachedir:
+                               writemsg("auxdb exception: [%(loc)s]: %(exception)s\n" % {"loc":mylocation+"::"+cat+"/"+pkg, "exception":str(e)})
                        if self.auxdb[mylocation][cat].has_key(pkg):
                                self.auxdb[mylocation][cat].del_key(pkg)
                                self.auxdb[mylocation][cat].sync()