PKGBUILDs should always use $srcdir and $pkgdir and their locations are not guaranteed to be $startdir/src and $startdir/pkg respecitively. Signed-off-by: Allan McRae <allan@archlinux.org> --- Namcap/invalidstartdir.py | 6 +++--- namcap-tags | 6 +++--- namcap.1 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Namcap/invalidstartdir.py b/Namcap/invalidstartdir.py index 69a6969..052b380 100644 --- a/Namcap/invalidstartdir.py +++ b/Namcap/invalidstartdir.py @@ -23,7 +23,7 @@ class package: def short_name(self): return "invalidstartdir" def long_name(self): - return "Looks for anything that's not $startdir/pkg or $startdir/src" + return "Looks for references to $startdir" def prereq(self): return "" def analyze(self, pkginfo, tar): @@ -34,9 +34,9 @@ class package: if j[:4] != '/pkg' and j[:4] != '/src': ret[0].append(("file-referred-in-startdir", ())) elif j[:4] == '/pkg': - ret[2].append(("recommend-use-pkgdir", ())) + ret[0].append(("use-pkgdir", ())) elif j[:4] == '/src': - ret[2].append(("recommend-use-srcdir", ())) + ret[0].append(("use-srcdir", ())) return ret def type(self): return "pkgbuild" diff --git a/namcap-tags b/namcap-tags index c144f06..c4b1b3d 100644 --- a/namcap-tags +++ b/namcap-tags @@ -25,7 +25,7 @@ empty-directory %s :: Directory (%s) is empty extra-var-begins-without-underscore %s :: Non standard variable '%s' doesn't start with an underscore file-in-non-standard-dir %s :: File (%s) exists in a non-standard directory. file-not-world-readable %s :: File (%s) does not have the world readable bit set. -file-referred-in-startdir :: File referenced in $startdir outside of $startdir/src or $startdir/pkg +file-referred-in-startdir :: File referenced in $startdir file-world-writable %s :: File (%s) has the world writable bit set. gnome-mime-file %s :: File (%s) is an auto-generated GNOME mime file hardlink-found %s points to %s :: Hard link (%s) found that points to %s @@ -56,13 +56,13 @@ perllocal-pod-present %s :: perllocal.pod found in %s. pkgname-in-description :: Description should not contain the package name. potential-non-fhs-info-page %s :: Potential non-FHS info page (%s) found. potential-non-fhs-man-page %s :: Potential non-FHS man page (%s) found. -recommend-use-pkgdir :: Recommend use of $pkgdir instead of $startdir/pkg -recommend-use-srcdir :: Recommend use of $srcdir instead of $startdir/src script-link-detected %s in %s :: Script link detected (%s) in file %s scrollkeeper-dir-exists %s :: Scrollkeeper directory exists (%s). Remember to not run scrollkeeper till post_{install,upgrade,remove}. specific-host-type-used %s :: Reference to one of %s should be changed to $CARCH specific-sourceforge-mirror :: Attempting to use specific sourceforge mirror, use downloads.sourceforge.net instead symlink-found %s points to %s :: Symlink (%s) found that points to %s too-many-md5sums %i needed :: Too Many md5sums: %i needed +use-pkgdir :: Use $pkgdir instead of $startdir/pkg +use-srcdir :: Use $srcdir instead of $startdir/src using-dl-sourceforge :: Attempting to use dl sourceforge domain, use downloads.sourceforge.net instead variable-not-array %s :: Variable %s is not an array. diff --git a/namcap.1 b/namcap.1 index f03186c..ea0a65a 100644 --- a/namcap.1 +++ b/namcap.1 @@ -77,7 +77,7 @@ files in /usr/share/icons/hicolor Verifies that a package does not contain the info directory file (/usr/share/info/dir) .TP .B invalidstartdir -Any PKGBUILDs that refer to files not stored in $startdir/pkg or $startdir/src are incorrect +Any PKGBUILDs that refer to files in $startdir are incorrect .TP .B libtool Warns if libtool (*.la) files are present -- 1.7.1