summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-14 07:17:51 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-14 07:17:51 +0000
commit01dd334a273b7b456b3223239ac86dacf4c1bd7c (patch)
tree0b8e849508c8ffb02dce9fc3048e494a5359b6c6 /pym/portage_locks.py
parentIn unhardlink_lockfile(), make sure not to touch lockfilename unless we reall... (diff)
downloadportage-multirepo-01dd334a273b7b456b3223239ac86dacf4c1bd7c.tar.gz
portage-multirepo-01dd334a273b7b456b3223239ac86dacf4c1bd7c.tar.bz2
portage-multirepo-01dd334a273b7b456b3223239ac86dacf4c1bd7c.zip
Remove all traces of atexit hardlock cleanup code, since it doesn't work correctly anyway.
svn path=/main/trunk/; revision=4447
Diffstat (limited to 'pym/portage_locks.py')
-rw-r--r--pym/portage_locks.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/pym/portage_locks.py b/pym/portage_locks.py
index 8e6a9803..98ccab8a 100644
--- a/pym/portage_locks.py
+++ b/pym/portage_locks.py
@@ -13,24 +13,10 @@ import types
import portage_exception
import portage_util
import portage_data
-from portage_exec import atexit_register
from portage_localization import _
HARDLINK_FD = -2
-hardlock_path_list = []
-def clean_my_hardlocks():
- for x in hardlock_path_list:
- hardlock_cleanup(x)
-def add_hardlock_file_to_cleanup(path):
- mypath = portage_util.normalize_path(path)
- if os.path.isfile(mypath):
- mypath = os.path.dirname(mypath)
- if os.path.isdir(mypath):
- hardlock_path_list = mypath[:]
-
-atexit_register(clean_my_hardlocks)
-
def lockdir(mydir):
return lockfile(mydir,wantnewlockfile=1)
def unlockdir(mylock):
@@ -229,9 +215,7 @@ def hardlink_lockfile(lockfilename, max_wait=14400):
Otherwise we lather, rise, and repeat.
We default to a 4 hour timeout.
"""
-
- add_hardlock_file_to_cleanup(lockfilename)
-
+
start_time = time.time()
myhardlock = hardlock_name(lockfilename)
reported_waiting = False