Scripts moved elsewhere
This commit is contained in:
parent
bee91c0495
commit
db80d670ed
3 changed files with 0 additions and 80 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/*.png
|
||||
/rpms/
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
script_location=$( (cd $(dirname $0) && pwd) )
|
||||
|
||||
module=$(basename $script_location)
|
||||
|
||||
mkdir -p rpms
|
||||
pushd rpms 2>&1 >/dev/null
|
||||
|
||||
rm -f need_branch
|
||||
for pkg in $(grep -B1 --no-group-separator buildorder ../$module.yaml | grep -v buildorder | sed -e 's/:$//') ; do
|
||||
if [ ! -d "$pkg" ] ; then
|
||||
fedpkg clone $pkg
|
||||
fi
|
||||
(cd $pkg ; git pull ; if ! fedpkg switch-branch $module ; then echo $pkg >> ../need_branch ; fi)
|
||||
done
|
||||
|
||||
popd 2>&1 >/dev/null
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import yaml
|
||||
from pygraphviz import AGraph
|
||||
from subprocess import call
|
||||
|
||||
with open("eclipse.yaml", 'r') as stream:
|
||||
yaml = yaml.safe_load(stream)
|
||||
|
||||
rpms = yaml['data']['components']['rpms']
|
||||
|
||||
g = AGraph(directed=True, name="G", strict=False, label="Build Order Graph")
|
||||
ranks = []
|
||||
for key, value in rpms.items():
|
||||
rank = value['buildorder']
|
||||
if rank not in ranks:
|
||||
ranks.append(rank)
|
||||
subg = g.get_subgraph(f"{rank}")
|
||||
if subg is None:
|
||||
subg = g.add_subgraph(name=f"{rank}", label=f"Build Order {rank}", rank="same")
|
||||
subg.add_node(f"{rank}")
|
||||
reqs = []
|
||||
breqs = []
|
||||
api = False
|
||||
for r in value['rationale'].replace('\n', ' ').split('.'):
|
||||
r = r.strip()
|
||||
if not r:
|
||||
continue
|
||||
if r == 'Module API':
|
||||
api = True
|
||||
continue
|
||||
if r.startswith('Runtime dependency of'):
|
||||
r = r[len('Runtime dependency of'):]
|
||||
reqs = [x.strip() for x in r.split(',')]
|
||||
if r.startswith('Build dependency of'):
|
||||
r = r[len('Build dependency of'):]
|
||||
breqs = [x.strip() for x in r.split(',')]
|
||||
if api:
|
||||
subg.add_node(key, color='green')
|
||||
else:
|
||||
subg.add_node(key)
|
||||
for req in reqs:
|
||||
# For Rs, check if also a BR
|
||||
if req not in breqs:
|
||||
g.add_edge(key, req, color='blue')
|
||||
else:
|
||||
g.add_edge(key, req, color='purple')
|
||||
for breq in breqs:
|
||||
# For BRs, check if also a R
|
||||
if breq not in reqs:
|
||||
g.add_edge(key, breq, color='red')
|
||||
ranks.sort()
|
||||
for idx, rank in enumerate(ranks):
|
||||
if idx+1 < len(ranks):
|
||||
g.add_edge(rank, ranks[idx+1], weight=1000)
|
||||
|
||||
|
||||
print(g.string())
|
||||
g.draw("build_order_graph.png", prog="dot")
|
||||
call('eog build_order_graph.png &', shell=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue