nroi / flexo

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

archzfs.db URL is not being created correctly #49

Closed n8henrie closed 3 years ago

n8henrie commented 3 years ago

Thank you for adding custom repos in https://github.com/nroi/flexo/issues/41! I thought it was working properly, but I think I was wrong -- I kept seeing 404s reported when I updated my databases, and ls /var/cache/flexo/pkg/archzfs/os/x86_64/ shows all zero-length files.

$ yay
[sudo] password for me: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                                                                                                           5.5 MiB   638 KiB/s 00:09 [########################################################################################] 100%
error: failed retrieving file 'archzfs.db' from myserver:7878 : The requested URL returned error: 404

I think my config is identical to the example in the readme and the example in /etc/flexo/flexo.toml:

On client:

[archzfs]
Server = http://myserver:7878/custom_repo/archzfs/$repo/os/$arch

On server:

[[custom_repo]]
    name = "archzfs"
    url = "https://archzfs.com"

When I added an extra line for some debug output I could see it is requesting https://archzfs.com/archzfs/os/x86_64/archzfs.db, but the actual URL is https://archzfs.com/archzfs/x86_64/archzfs.db (no os).

Looking more closely, I just now noticed that it looks like the URI is properly shown (without os) in the readme, but incorrect in the comments in flexo.toml. PR incoming.