summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-09-24 19:13:25 +0000
committerBrian Harring <ferringb@gentoo.org>2005-09-24 19:13:25 +0000
commit9d7c2ca645653e2533355aa305977c5e601377a2 (patch)
tree5b22f813a2617ea46163129c43d3338031209597
parentd2ccf4135a8ae3e326804b7fc0167e0b51bb59b3 (diff)
downloadportage-9d7c2ca645653e2533355aa305977c5e601377a2.tar.gz
portage-9d7c2ca645653e2533355aa305977c5e601377a2.tar.bz2
portage-9d7c2ca645653e2533355aa305977c5e601377a2.zip
emerge --metadata ran as user, and silenced auxdb Corruption exceptions when doing metadata transfer.
svn path=/main/branches/2.0/; revision=2025
-rw-r--r--ChangeLog9
-rwxr-xr-xbin/emerge4
-rw-r--r--pym/portage.py3
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 <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:
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()