Mercurial > gub
changeset 5390:b0625fd477ef
locker: ugh, lock outside of tree for now. Enables building of /GUB.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Wed, 22 Jul 2009 15:25:36 +0200 |
parents | f18d63f012b4 |
children | d8ad4c1ce468 |
files | gub/gup.py gub/locker.py |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/gup.py Wed Jul 22 15:21:54 2009 +0200 +++ b/gub/gup.py Wed Jul 22 15:25:36 2009 +0200 @@ -45,7 +45,9 @@ self.is_distro = False ## lock must be outside of root, otherwise we can't rm -rf root - self.lock_file = self.root + '.lock' + ## self.lock_file = self.root + '.lock' + ## Well, stuff it: /GUB.lock: permission denied + self.lock_file = self.root + '/.lock2' if self.root == os.environ['HOME']: self.lock_file = self.root + '/.gub.lock' self.lock = locker.Locker (self.lock_file) @@ -444,6 +446,8 @@ def name_to_dependencies_via_gub (url): platform, url = split_platform (url) + if platform == 'tools': + platform = settings.build_platform if ':' in url: base, unused_parameters = misc.dissect_url (url) name = (os.path.basename (base)
--- a/gub/locker.py Wed Jul 22 15:21:54 2009 +0200 +++ b/gub/locker.py Wed Jul 22 15:25:36 2009 +0200 @@ -36,7 +36,8 @@ fcntl.flock (lock_file.fileno (), fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError: - raise LockedError ("Can't acquire lock: " + lock_file_name) + os.system ('ls -ltrF ' + os.path.dirname (lock_file_name) + '/') + raise LockedError ('''Can't acquire lock: ''' + lock_file_name) self.lock_file_name = lock_file_name self.lock_file = lock_file