From 9d7c2ca645653e2533355aa305977c5e601377a2 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Sat, 24 Sep 2005 19:13:25 +0000 Subject: emerge --metadata ran as user, and silenced auxdb Corruption exceptions when doing metadata transfer. svn path=/main/branches/2.0/; revision=2025 --- ChangeLog | 9 +++++++++ bin/emerge | 4 ++-- pym/portage.py | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 953c8f252..2bb12f09e 100644 --- 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 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 pym/portage.py, +pym/portage_db_metadata.py, +pym/portage_db_flat_hash.py, pym/portage_db_flat.py, pym/portage_const.py: diff --git a/bin/emerge b/bin/emerge index 7f482eed7..ed5f9ee0a 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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 diff --git a/pym/portage.py b/pym/portage.py index 26dd195f2..bcaff842c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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() -- cgit v1.2.3-1-g7c22