[Pkg-haskell-commits] darcs: tools: Make graph draw edges across transitions
Joachim Breitner
mail at joachim-breitner.de
Wed Apr 13 09:21:17 UTC 2011
Wed Apr 13 09:20:48 UTC 2011 Joachim Breitner <mail at joachim-breitner.de>
* Make graph draw edges across transitions
Ignore-this: aeb9846c035a184749511d87a2aa5e35
M ./haskell-pkg-graph.py -5 +11
Wed Apr 13 09:20:48 UTC 2011 Joachim Breitner <mail at joachim-breitner.de>
* Make graph draw edges across transitions
Ignore-this: aeb9846c035a184749511d87a2aa5e35
diff -rN -u old-tools/haskell-pkg-graph.py new-tools/haskell-pkg-graph.py
--- old-tools/haskell-pkg-graph.py 2011-04-13 09:21:17.793893523 +0000
+++ new-tools/haskell-pkg-graph.py 2011-04-13 09:21:17.805894153 +0000
@@ -181,21 +181,27 @@
if len(rel) != 1:
continue # the dependencies we care about are not optional
opt = rel[0]
- if opt['name'] not in self.haskell_lib_to_source:
- continue
+ depname = opt['name']
+ if depname not in self.haskell_lib_to_source:
+ # try transition
+ depname = depname.replace("libghc6-","libghc-")
+ if depname not in self.haskell_lib_to_source:
+ continue
+
# avoid loops
- if hash(self.haskell_lib_to_source[opt['name']]['package']) == hash(src['package']):
+ if hash(self.haskell_lib_to_source[depname]['package']) == hash(src['package']):
continue
# avoid cpphs, haddock etc.
- if opt['name'] in ('alex','c2hs','cpphs','happy','hscolour','haddock'):
+ if depname in ('alex','c2hs','cpphs','happy','hscolour','haddock'):
continue
+
# avoid cpphs, haddock etc.
#if opt['name'] in ('ghc','ghc-doc','ghc-prof'):
# continue
- edge = (hash(self.haskell_lib_to_source[opt['name']]['package']), hash(src['package']))
+ edge = (hash(self.haskell_lib_to_source[depname]['package']), hash(src['package']))
if edge not in seen_edges:
print '%s -> %s;' % edge
seen_edges.add(edge)
More information about the Pkg-haskell-commits
mailing list