[SCM] debian-live/live-helper branch, master, updated. 1.0_a28-1-4-g1c61ab4

Daniel Baumann daniel at debian.org
Tue Sep 18 06:24:41 UTC 2007


The branch, master has been updated
       via  1c61ab4b8ae235294b8f88499e61df562d521b09 (commit)
       via  f1083b57dfcfe5570d4b5ce71ab77ba2ed66a615 (commit)
      from  5d74f2962d8100bbf6b4b2256fcdbecf7f023379 (commit)


- Shortlog ------------------------------------------------------------
1c61ab4 debian/copyright
f1083b5 contrib/graph-helpers.py

Summary of changes:
 contrib/graph-helpers/graph-helpers.py |   74 ++++++++++++++++++++++++++++++++
 debian/copyright                       |   23 +++++++++-
 2 files changed, 95 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 1c61ab4b8ae235294b8f88499e61df562d521b09
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Sep 18 08:24:28 2007 +0200

    debian/copyright
    
      * Adding contrib/graph-helpers/*.

diff --git a/contrib/graph-helpers.py b/contrib/graph-helpers/graph-helpers.py
old mode 100644
new mode 100755
similarity index 100%
rename from contrib/graph-helpers.py
rename to contrib/graph-helpers/graph-helpers.py
diff --git a/debian/copyright b/debian/copyright
index 47f1f34..87b06f7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -30,8 +30,27 @@ License:
 On Debian systems, the complete text of the GNU General Public License
 can be found in /usr/share/common-licenses/GPL-2 file.
 
-License (contrib/grub-splash/*, contrib/syslinux-splash/*,
-templates/syslinux/splash.rle, templates/grub/splash.xpm.gz):
+License (contrib/graph-helpers/*):
+
+	Copyright (C) 2007 Chris Lamb <chris at chris-lamb.co.uk>
+
+	This program is free software: you can redistribute it and/or modify
+	it under the terms of the GNU General Public License as published by
+	the Free Software Foundation, either version 3 of the License, or
+	(at your option) any later version.
+
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+	GNU General Public License for more details.
+
+	You should have received a copy of the GNU General Public License
+	along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL-3 file.
+
+License (contrib/grub-splash/*, contrib/syslinux-splash/*):
 
 	The splash for Debian Live was done by Daniel Baumann
 	<daniel at debian.org> based on the original work of Mark Riedesel.

commit f1083b57dfcfe5570d4b5ce71ab77ba2ed66a615
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Tue Sep 18 00:29:25 2007 +0100

    contrib/graph-helpers.py
    
      * Added file.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/contrib/graph-helpers.py b/contrib/graph-helpers.py
new file mode 100644
index 0000000..a0eceb8
--- /dev/null
+++ b/contrib/graph-helpers.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+
+"""
+    live-helper simulated execution graph generator.
+    Copyright (C) 2007  Chris Lamb <chris at chris-lamb.co.uk>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+import sys, re
+import pygraphviz
+
+groups = {
+    'lh_bootstrap' : 'orange',
+    'lh_chroot' : 'red',
+    'lh_source' : 'blue',
+    'lh_binary' : 'green',
+    'lh_build' : 'brown'
+}
+pattern = re.compile(r'^(lh_.+?) ')
+
+def main(start):
+    global prev
+    G = pygraphviz.AGraph(directed=True)
+    G.graph_attr['label'] = 'Simulated execution trace for live-helper.'
+
+    def helper(filename):
+        global prev
+        for line in gen_matches(filename):
+            G.add_edge(prev, line)
+            style(G.get_node(prev), prev)
+            prev = line
+            helper(line)
+
+    prev = start
+    helper(start)
+    G.layout(prog='dot')
+    print G.draw(format='svg')
+
+def style(node, name):
+    if name in groups.keys():
+        node.attr['shape'] = 'box'
+        node.attr['style'] = 'bold'
+    else:
+        node.attr['fontsize'] = '11'
+    for group_name, color in groups.iteritems():
+        if name.startswith(group_name):
+            node.attr['color'] = color
+    return node
+
+def gen_matches(filename):
+    f = open('/usr/bin/%s' % filename, 'r')
+    for line in f.xreadlines():
+        match = pattern.match(line)
+        if match:
+            yield match.group(1)
+    f.close()
+
+if __name__ == "__main__":
+    if len(sys.argv) == 2:
+        main(sys.argv[1])
+    else:
+        main('lh_build')

-- 
debian-live/live-helper



More information about the debian-live-changes mailing list