summaryrefslogtreecommitdiff
path: root/portato/backend/package.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-09-15 08:43:06 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-09-15 08:43:06 +0200
commite829a5822f25e957fa837ef52868508eb3c7505e (patch)
treec59cdd5b46857d34f543ac6f0a0b0ee08326c641 /portato/backend/package.py
parent839d5c95803272546a0348743f09a8da56bc006a (diff)
downloadportato-e829a5822f25e957fa837ef52868508eb3c7505e.tar.gz
portato-e829a5822f25e957fa837ef52868508eb3c7505e.tar.bz2
portato-e829a5822f25e957fa837ef52868508eb3c7505e.zip
New dependency handling. Should fix some bugs.
Diffstat (limited to '')
-rw-r--r--portato/backend/package.py28
1 files changed, 1 insertions, 27 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index e4b2082..c9f87ac 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -180,34 +180,8 @@ class Package (_Package):
deps = paren_reduce(deps)
tree = DependencyTree()
+ tree.parse(deps)
- def add (tree, deps):
- it = iter(deps)
- for dep in it:
- if hasattr(dep, "__iter__"):
- debug("Following dep is an unsupposed list: %s", dep)
- assert(len(dep) == 1)
- dep = dep[0]
- if dep.endswith("?"):
- ntree = tree.add_flag(dep[:-1])
- n = it.next()
- if not hasattr(n, "__iter__"):
- n = (n,)
- add(ntree, n)
-
- elif dep == "||":
- n = it.next() # skip
- if not hasattr(n, "__iter__"):
- n = [n]
- else:
- n = list(n)
-
- tree.add_or(n)
-
- else:
- tree.add(dep)
-
- add(tree, deps)
return tree
#