cli/prune: fix a case where parts where not detected as used from a recursive instance
To consider if a shared part is used, we consider all files named `slapos.cfg` in the instance and try to parse them as a slapos config file. The problem was that as soon as a file can not be parsed as a slapos config file, we did not continue to evaluate other `slapos.cfg` files. It was a `return` where it should have been a `continue`. This was especially incorrect, because when we have recursive slapos, we usually have a working copy of slapos repository, which contain `stack/slapos.cfg`, which is not a valid slapos config file. As a result, when a top level shared part was used in a software installed in the recursive slapos from a theia or slaprunner instance, this shared part was not detected as used and could have been deleted. The fix consist in checking all `slapos.cfg` files. This will make slapos node prune command probably much slower, because it will really iterate on all files now. Anyway this was fast because it was wrong.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
failed |
#253719
external
|
SlapOS-Master.UnitTest-Master |
03:59:12
|
||||||
passed |
#253750
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:33:11
|
||||||
failed |
#253803
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
|
||||||
failed |
#253713
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:11:39
|
||||||
passed |
#253724
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:14:22
|
||||||
failed |
#253749
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:35:19
|
||||||
failed |
#253793
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
|
||||||
failed |
#253794
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
|
||||||