[arch-dev-public] [PATCH] Detect more usages of $startdir
Allan McRae
allan at archlinux.org
Mon Jun 14 23:35:39 EDT 2010
The detection of $startdir usage ignored any potential brackets or
quotes. Now the following are all detected:
$startdir
${startdir}
"$startdir"
"${startdir}"
Signed-off-by: Allan McRae <allan at archlinux.org>
---
Namcap/invalidstartdir.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Namcap/invalidstartdir.py b/Namcap/invalidstartdir.py
index f323b76..720e5cd 100644
--- a/Namcap/invalidstartdir.py
+++ b/Namcap/invalidstartdir.py
@@ -29,7 +29,7 @@ class package:
def analyze(self, pkginfo, tar):
ret = [[], [], []]
for i in pkginfo.pkgbuild:
- startdirs = re.split('\$startdir', i)
+ startdirs = re.split('\${?startdir}?"?', i)
for j in startdirs[1:]:
if j[:4] != '/pkg' and j[:4] != '/src':
ret[0].append(("file-referred-in-startdir", ()))
--
1.7.1
More information about the arch-dev-public
mailing list