getsolus / solbuild

The Solus package build system
https://getsol.us
Apache License 2.0
21 stars 12 forks source link

solbuild delete-cache/dc -s/--size flag is under-documented #80

Closed ermo closed 1 month ago

ermo commented 8 months ago

When using the --sizes/-s flag with the delete-cache/dc command, solbuild only displays the cache size, it doesn't actually delete anything.

This is counter-intuitive and needs to be better explained by the help text and the output text.

Test Case demonstrating the problem:

sudo solbuild dc -ais && sudo solbuild init -u

Expected Behaviour

Solbuild deletes all of its cache and images and then downloads new image and updates its cache with updated packages

Observed Behaviour

Solbuild doesn't delete anything and refuses to download new images.

$ sudo solbuild delete-cache --all --images --sizes
 ✓  Size of '/var/cache/solbuild' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/cache' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/ccache/ypkg' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/sccache/ypkg' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/ccache/legacy' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/sccache/legacy' is '0.0 B' 
 ✓  Size of '/var/lib/solbuild/packages' is '69.1 MiB' 
 ✓  Size of '/var/lib/solbuild/sources' is '0.0 B' 
 ✓  Total size: '69.1 MiB' 
$ sudo solbuild init --update
 🗲  Image has already been initialised name=unstable-x86_64
silkeh commented 8 months ago

After closer inspection I think that the flag should not belong there in the first place. As fixing this properly has no place in a bug fix release I've moved this issue to the 1.7.0 milestone (along with the relevant MR) to merge after 1.6.1.