aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portell/files/patch-portell.py
blob: 51177d7a848ba8a25ee622b325ee76ae2cc150db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

$FreeBSD$

--- portell.py.orig
+++ portell.py
@@ -14,12 +14,16 @@
     PORTELL_DB = "/var/db/portell.db"
 
 PORTS_DIR = "/usr/ports/"
-
+IGNORE_DIRS = { "distfiles":None, "Tools":None, "packages":None }
 
 def write_pathname(d, dirname, names):
-    '/'.join(dirname.split('/')[:5]) # chop port path subdirs
-    d[os.path.basename(dirname)] = dirname
-
+	dirs=dirname.split('/')
+	if len(dirs)==4:
+	    if IGNORE_DIRS.has_key(dirs[3]):
+		del names[:]
+	elif len(dirs)==5:
+	    d[dirs[4]] = dirname
+	    del names[:]
 
 def update_db(msg):
     print msg