this happens fairly often to me on one machine: --8<-- [...] >>> emerge (4 of 4) sys-fs/mtools-3.9.9 to / Traceback (most recent call last): File "/usr/bin/emerge", line 3045, in ? mydepgraph.merge(mydepgraph.altlist()) File "/usr/bin/emerge", line 1808, in merge retval=portage.doebuild(y,"package",myroot,self.pkgsettings,edebug) File "/usr/lib/portage/pym/portage.py", line 2546, in doebuild mysettings["SLOT"], mysettings["RESTRICT"] = db["/"]["porttree"].dbapi.aux_get(mycpv,["SLOT","RESTRICT"]) File "/usr/lib/portage/pym/portage.py", line 5262, in aux_get self.auxdb[mylocation][cat][pkg] = mydata File "/usr/lib/portage/pym/portage_db_template.py", line 85, in __setitem__ return self.set_values(key,values) File "/usr/lib/portage/pym/portage_db_flat.py", line 92, in set_values mylock = portage_locks.lockfile(self.fullpath+key, wantnewlockfile=1) File "/usr/lib/portage/pym/portage_locks.py", line 65, in lockfile raise portage_exception.DirectoryNotFound, os.path.dirname(mypath) portage_exception.DirectoryNotFound: '/var/cache/edb/dep//usr/portage/sys-fs' --8<--
I got a similar error last night. It's very possible that 'emerge sync' was running right around the time this happened. I left it compiling overnight and have a cron job that syncs the tree. >>> emerge (31 of 47) sys-apps/coreutils-5.2.1-r4 to / QA Notice: ECLASS 'eutils' inherited illegally in sys-apps/coreutils-5.2.1-r4 QA Notice: ECLASS 'multilib' inherited illegally in sys-apps/coreutils-5.2.1-r4 QA Notice: ECLASS 'flag-o-matic' inherited illegally in sys-apps/coreutils-5.2.1-r4 QA Notice: ECLASS 'toolchain-funcs' inherited illegally in sys-apps/coreutils-5.2.1-r4 Traceback (most recent call last): File "/usr/bin/emerge", line 3045, in ? mydepgraph.merge(mydepgraph.altlist()) File "/usr/bin/emerge", line 1808, in merge retval=portage.doebuild(y,"package",myroot,self.pkgsettings,edebug) File "/usr/lib/portage/pym/portage.py", line 2546, in doebuild mysettings["SLOT"], mysettings["RESTRICT"] = db["/"]["porttree"].dbapi.aux_get(mycpv,["SLOT","RESTRICT"]) File "/usr/lib/portage/pym/portage.py", line 5262, in aux_get self.auxdb[mylocation][cat][pkg] = mydata File "/usr/lib/portage/pym/portage_db_template.py", line 85, in __setitem__ return self.set_values(key,values) File "/usr/lib/portage/pym/portage_db_flat.py", line 92, in set_values mylock = portage_locks.lockfile(self.fullpath+key, wantnewlockfile=1) File "/usr/lib/portage/pym/portage_locks.py", line 65, in lockfile raise portage_exception.DirectoryNotFound, os.path.dirname(mypath) portage_exception.DirectoryNotFound: '/var/cache/edb/dep//usr/portage/sys-apps'
ah, well, similar setup here (cron'd 'emerge --sync'). interesting. can some portage dev please comment on this speculation? :)
so if I understand this correctly you're running emerge --sync at the same time as another portage operation (emerge -pv or emerge -uD world or ...)? Likely a race condition in the cache update.
Sync will remove the cache immediately prior to the metadata updating. Can't really fix that... If you tell portage to remove things, it can't be expected to perform well, obey your orders, and not explode at the same time. This would require a big special case code block to handle.
well, it's impracticable to me to have a machine _not_ sync automatically. and if you *do* have it sync automatically, it's impracticable to wait until an eventual automatic sync run is finished. so, what can we do about this? why does portage need to read something on every single package merge in a row of merges? why can't it read it at the beginning only?