Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop returning 404 by providing a local reverse-proxy #2

Open
MayeulC opened this issue Aug 19, 2018 · 3 comments
Open

Stop returning 404 by providing a local reverse-proxy #2

MayeulC opened this issue Aug 19, 2018 · 3 comments

Comments

@MayeulC
Copy link

MayeulC commented Aug 19, 2018

Those 404 when a package isn't in the network cache can get annoying. I would suggest providing (at least as an option) a reverse-proxy to the default mirror (that could be specified explicitly in pacredir's configuration, or maybe obtained automatically as well).

For now, the 404s can be informative, but you might as well get this information for the download speed, and I systematically get them when updating on the go with my laptop.

Thanks for this awesome way of speeding up upgrades over my slow connection, this is exactly what I was looking for ❤️

@eworm-de
Copy link
Owner

I've thought of getting rid of the 404s myself. Sadly it's not that easy.

The database and package cache is just flat, there's no architecture, repository name or extra path. I could allow to give extra path and just strip it when redirecting to pacserve.
But where to get the first mirror? pacredir.conf? pacman.conf? First would add duplicate configuration, second would add even more extra complexity as configuration supports includes and different mirrors for repositories. And the path given to pacredir has to match the mirrors' path.

Please elaborate if I got you wrong, but I think this is not an easy task and not worth the trouble just to get rid of some messages.

I thought about doing it the other way round: Instead of returning 404 pacredir could use something like 204 (No Content). Then pacman should recognize this as "soft failure", just ignore it without error messages and skip to the next mirrors. I've not contacted upstream about it nor prepared any patches. Currently pacman interprets all 20x codes as success without further action.

@MayeulC
Copy link
Author

MayeulC commented Aug 24, 2018

Hi, you ate right regarding the added complexity regarding configuration, I thought about this too. Both solutions have obvious drawbacks, but perhaps that could be worked around with upstream? If pacman.conf supported a "package cache" URL, that would help a lot. I could ask them, if you want.

@eworm-de
Copy link
Owner

BTW, there is a related issue for pacman: FS#23407 - Allow soft failures on Server URLs

Perhaps investigating there makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants