It is now unused, and caused confusion regarding the sandbox directory
stuff. Ideally it should never need to be used again, as all rules
should operate directly on the tarball.

Signed-off-by: Dan McGee <d...@archlinux.org>
---
 Namcap/ruleclass.py |    5 -----
 README              |    1 -
 namcap.py           |   14 --------------
 3 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/Namcap/ruleclass.py b/Namcap/ruleclass.py
index f34c657..15250ad 100644
--- a/Namcap/ruleclass.py
+++ b/Namcap/ruleclass.py
@@ -44,9 +44,4 @@ class TarballRule(AbstractRule):
        "The parent class of rules that process tarballs"
        pass
 
-class PkgdirRule(AbstractRule):
-       """The parent class of rules that process pkgdirs
-       (extracted tarballs)"""
-       pass
-
 # vim: set ts=4 sw=4 noet:
diff --git a/README b/README
index b52ea42..89f6fb5 100644
--- a/README
+++ b/README
@@ -84,7 +84,6 @@ defined in Namcap.rules.all_rules :
        * PkgInfoRule classes process any pkginfo object
        * PkgbuildRule classes process only PKGBUILDs
        * TarballRule classes process binary packages
-       * PkgdirRule classes (unused) process uncompressed binary packages
 
 Put the new rule in a module and make sure it is imported in
 Namcap/rules/__init__.py
diff --git a/namcap.py b/namcap.py
index dcebc55..cca5dd6 100755
--- a/namcap.py
+++ b/namcap.py
@@ -32,8 +32,6 @@ import types
 import Namcap.depends
 import Namcap.tags
 
-sandbox_directory = '/tmp/namcap.' + str(os.getpid())
-
 # Functions
 def get_modules():
        """Return all possible modules (rules)"""
@@ -97,14 +95,6 @@ def process_realpackage(package, modules):
 
                if isinstance(rule, Namcap.ruleclass.PkgInfoRule):
                        rule.analyze(pkginfo, None)
-               elif isinstance(rule, Namcap.ruleclass.PkgdirRule):
-                       # If it's not extracted, extract it and then analyze 
the package
-                       if not extracted:
-                               os.mkdir(sandbox_directory)
-                               for j in pkgtar.getmembers():
-                                       pkgtar.extract(j, sandbox_directory)
-                               extracted = 1
-                       rule = pkg.analyze(pkginfo, sandbox_directory)
                elif isinstance(rule, Namcap.ruleclass.PkgbuildRule):
                        pass
                elif isinstance(rule, Namcap.ruleclass.TarballRule):
@@ -126,10 +116,6 @@ def process_realpackage(package, modules):
        if info_reporting:
                show_messages(pkginfo["name"], 'I', infos)
 
-       # Clean up if we extracted anything
-       if extracted:
-               shutil.rmtree(sandbox_directory)
-
 def process_pkginfo(pkginfo, modules):
        """Runs namcap checks of a single, non-split PacmanPackage object"""
        for i in modules:
-- 
1.7.6.1

Reply via email to