Because we do not want to depend on <pack>groupxx if it creates a circular

dependency, it may happen that nothing depends on <pack>groupxx. Detect and
    fix this by appending <pack>groupsxx to root.dep
This commit is contained in:
Pierre Labastie 2018-02-02 21:12:30 +00:00
parent d80302bf94
commit f1edc8e377

View file

@ -265,6 +265,7 @@ done
for node in $(grep -l ' a ' *.dep); do for node in $(grep -l ' a ' *.dep); do
lines_to_remove= lines_to_remove=
if ! [ -e ${node%.dep}groupxx.dep ]; then if ! [ -e ${node%.dep}groupxx.dep ]; then
b=0
for parent in $(grep -l ${node%.dep}\$ *); do for parent in $(grep -l ${node%.dep}\$ *); do
p=0 p=0
for start in $(grep ' a ' $node | cut -d' ' -f3); do for start in $(grep ' a ' $node | cut -d' ' -f3); do
@ -272,10 +273,12 @@ for node in $(grep -l ' a ' *.dep); do
if path_to ${start}.dep ${parent%.dep} 3; then p=1; break; fi if path_to ${start}.dep ${parent%.dep} 3; then p=1; break; fi
done done
if test $p = 0; then if test $p = 0; then
b=1
sed -i "s/\ ${node%.dep}\$/&groupxx/" $parent sed -i "s/\ ${node%.dep}\$/&groupxx/" $parent
fi fi
done done
echo "1 b ${node%.dep}" > ${node%.dep}groupxx.dep echo "1 b ${node%.dep}" > ${node%.dep}groupxx.dep
if test $b = 0; then echo "1 b ${node%.dep}groupxx" >> root.dep; fi
fi fi
{ {
while read prio_of_dep build_of_dep id_of_dep; do while read prio_of_dep build_of_dep id_of_dep; do