Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124352 - portage locks don't work correctly with NFS
Summary: portage locks don't work correctly with NFS
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-27 21:13 UTC by Sumit Khanna
Modified: 2006-02-28 02:05 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 Sumit Khanna 2006-02-27 21:13:01 UTC
I'm currently having trouble with portage. My /usr/portage tree resides one one machine and is shared to my network via NFS using the following line in /etc/exports:

/usr/portage    *.turtles(rw,sync,no_root_squash)

(turtles being a local DNS zone). Anyway, with the new distfile locking feature that's been added, I get errors like the following:

>>> Emerging (1 of 3) sys-apps/portage-2.1_pre5-r1 to /

Waiting on (hardlink) lockfile: (one '.' per 3 seconds)
This is a feature to prevent distfiles corruption.
/usr/lib/portage/bin/clean_locks can fix stuck locks.
Lockfile: /usr/portage/distfiles/.locks/portage-2.1_pre5.tar.bz2.portage_lockfile
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3304, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 2008, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug,tree="porttree")
  File "/usr/lib/portage/pym/portage.py", line 2823, in doebuild
    if need_distfiles and not fetch(fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
  File "/usr/lib/portage/pym/portage.py", line 1880, in fetch
    file_lock = portage_locks.lockfile(mysettings["DISTDIR"]+"/"+locks_in_subdir+"/"+myfile,wantnewlockfile=1)
  File "/usr/lib/portage/pym/portage_locks.py", line 93, in lockfile
    fcntl.lockf(myfd,fcntl.LOCK_EX|fcntl.LOCK_NB)
IOError: [Errno 37] No locks available

on all of my machines. I'm guessing special parameters are needed for NFS and the new file locking mechnism. Even if I clean out all the locks I still get this error. Is there anyway to detect the presence of a distfile on an NFS share and give an error message stating what needs to be done to fix the problem (if it's fixabe?)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-02-28 02:05:50 UTC
Upgrade your portage with FEATURES="-distlocks" and try again with 2.1_pre5-r1. Reopen if it's still broken there.