nroi / flexo

a central pacman cache
MIT License
172 stars 10 forks source link

Should initialize the cache directory if the directory was made outside of Flexo #77

Closed jarrodsfarrell closed 2 years ago

jarrodsfarrell commented 2 years ago

https://github.com/nroi/flexo/blob/ec0015a45a40f9a789fc1f6860062ac8c053c147/flexo/src/mirror_flexo.rs#L486-L503 https://github.com/nroi/flexo/blob/ec0015a45a40f9a789fc1f6860062ac8c053c147/flexo/src/mirror_cache.rs#L43-L60

Was setting up Flexo using the docker container and wanted the cache to persist on the host, but Flexo crashes if /var/cache/flexo was made before starting it the first time.

nroi commented 2 years ago

Thanks for reporting this. Ignore my previous message, I was able to reproduce this.

nroi commented 2 years ago

Looks like I overlooked something and the bug wasn't fixed after all. It should be fixed now with version 1.6.2, I wasn't able to reproduce the issue anymore. I can run the docker image like so:

docker run -it --rm -p 7878:7878 -v /tmp/flexo:/var/cache/flexo  nroi/flexo:1.6.2

and Flexo doesn't crash anymore, even if the directory /tmp/flexo is empty.