[28168] in Source-Commits
locker-support commit: Use correct test for paths vs lockers; fix -f
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Apr 17 09:00:41 2014
Date: Thu, 17 Apr 2014 09:00:33 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201404171300.s3HD0Xji000394@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/locker-support/commit/9a8901cd4529f0297e1c467e550435fac387f118
commit 9a8901cd4529f0297e1c467e550435fac387f118
Author: Jonathan Reed <jdreed@mit.edu>
Date: Wed Apr 16 12:57:27 2014 -0400
Use correct test for paths vs lockers; fix -f
- Per the man page, something is a path (not a locker) if it
starts with '.' or '/'
- Adding a path now honors "-f" rather than always appending
attach | 7 +++++--
setup.py | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/attach b/attach
index 4ea6791..e1455c0 100755
--- a/attach
+++ b/attach
@@ -257,7 +257,7 @@ if (len(argv) > 0) and (argv[0] == "-Padd"):
lockers = []
paths = []
for x in args + atargs:
- if '/' in x:
+ if x.startswith('.') or x.startswith('/'):
paths.append(x)
else:
lockers.append(x)
@@ -295,7 +295,10 @@ if (len(argv) > 0) and (argv[0] == "-Padd"):
if mountpoint is not None:
env.addLocker(mountpoint, options)
for p in paths:
- env['PATH'].append(p)
+ if options.front:
+ env['PATH'].insert(0, p)
+ else:
+ env['PATH'].append(p)
print env.toShell(options.bourne)
else:
(options, args) = attachParser.parse_args(argv)
diff --git a/setup.py b/setup.py
index bc59d72..a10851d 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from distutils.core import setup
setup(name='locker-support',
- version='10.4.5',
+ version='10.4.6',
author='Debathena Project',
author_email='debathena@mit.edu',
py_modules=['locker', 'athdir'],