]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Validate package directories.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Feb 2010 19:00:21 +0000 (20:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Feb 2010 19:00:21 +0000 (20:00 +0100)
They must contain a naoki makefile with correct extension, etc.

naoki/package.py

index 3d0673f22152f09c4f73f95a3e590536b57cfca1..3339479abdc2a0cdb95ae07abdcc0f290a38931b 100644 (file)
@@ -30,8 +30,10 @@ def list(toolchain=None):
                                continue
 
                for package in os.listdir(os.path.join(PKGSDIR, dir)):
-                       package = os.path.join(dir, package)
-                       pkgs.append(Package(package))
+                       path = os.path.join(PKGSDIR, dir, package)
+                       if not os.path.exists(os.path.join(path, package + ".nm")):
+                               continue
+                       pkgs.append(Package(path))
 
        pkgs.sort()
        return pkgs