Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53037 - portage_db_anydbm failed with emerge in non-root mode
Summary: portage_db_anydbm failed with emerge in non-root mode
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-06-05 02:07 UTC by Nguyen Thai Ngoc Duy (RETIRED)
Modified: 2004-10-22 08:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2004-06-05 02:07:19 UTC
It failed because it tried to open .anydbm files in 'rw' mode. If it can't open in 'rw' mode, it should open with 'r' mode.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-06-05 15:13:23 UTC
What version of portage?
Is your user in the portage group?
What are the modes and owners on the cache?
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2004-06-09 16:57:21 UTC
Cant fix it without info on the problem.
Comment 3 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2004-06-10 11:30:20 UTC
Sorry for taking so long portage-2.0.50-r7 my account is in group portage. the mode of *.anydbm is 644 (root/portage) I just notice that if i do emerge -s with root first, then with a normal account, then the problem occur. If i remove all anydbm and emerge -s with normal accounts first, it works fine (owner of *.anydbm is pclouds, not root anymore) here is the error messages: $emerge -s xvnkb Searching...  \Traceback (most recent call last):   File "/usr/bin/emerge", line 2331, in ?     searchinstance.execute(mysearch)   File "/usr/bin/emerge", line 545, in execute     if not portage.portdb.xmatch("match-visible",package):   File "/usr/lib/portage/pym/portage.py", line 4712, in xmatch     myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))   File "/usr/lib/portage/pym/portage.py", line 4698, in xmatch     myval=self.gvisible(self.visible(self.cp_list(mykey)))   File "/usr/lib/portage/pym/portage.py", line 4793, in gvisible     myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])   File "/usr/lib/portage/pym/portage.py", line 4498, in aux_get     self.auxdb[cat] = self.auxdbmodule(self.cachedir,cat,auxdbkeys,uid,portage_gid)   File "/usr/lib/portage/pym/portage_db_anydbm.py", line 22, in __init__     self.db = anydbm.open(self.filename, "n", 0664)   File "/usr/lib/python2.3/anydbm.py", line 83, in open     return mod.open(file, flag, mode)   File "/usr/lib/python2.3/dbhash.py", line 16, in open     return bsddb.hashopen(file, flag, mode)   File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen     d.open(file, db.DB_HASH, flags, mode) bsddb._db.DBAccessError: (13, 'Permission denied')
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-06-10 11:56:31 UTC
portage-2.0.50-r8 lacks the prevmask=os.umask(0) / os.umask(prevmask) wrapper the later versions have.

It's fixed in .51- meanwhile, could pull down a .51 tarball and take a look at the src.
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:01 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2