Commit 00e855d9 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add printing of scripts/commands in --dependency-tree

parent 5a43a511
......@@ -49,8 +49,6 @@ if __name__ == '__main__':
print('XXX ', l)
pass
print(FILES)
print(len(FILES))
PYTHON = set()
PYTHON2 = set()
for f in FILES:
......
......@@ -312,8 +312,21 @@ if __name__ == '__main__':
if options.dependency_tree != None:
def dump_tree(name, indent=0):
def command_or_script(cos, prefix=''):
if cos.command[0] != None:
print("%s [%s command] %s" % (
(' '*indent, prefix, cos.command[0])))
pass
pass
if cos.script[0] != None:
print("%s [%s script] %s" % (
(' '*indent, prefix, cos.script[0])))
pass
pass
print('%s%s' % (' '*indent, name))
tree = rules.get(name)
for p in tree._pre_:
command_or_script(p, 'pre')
if not options.noyum:
for r in tree._rpm_:
print("%s[r] %s" % (' '*(indent+1), r.name[0]))
......@@ -331,11 +344,13 @@ if __name__ == '__main__':
f.source[0] or f.name[0]))
print('%s[f] %s = %s' % (' '*(indent+1), f.name[0], src))
pass
for p in tree._post_:
command_or_script(p, 'post')
for d in tree._dependency_:
dump_tree(d.name[0], indent+1)
pass
pass
todo = [i for l in options.dependency_tree for i in l]
todo = [i for l in options.dependency_tree for i in l] # Flatten list
if len(todo) == 0:
tree = parse('hostinfo.xml')
todo = [ h.name[0] for h in tree._group_]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment