Closed juledwar closed 2 years ago
Looking at it some more, it needs to communicate failure states back to the other side. If there's no response, it just assumes there's no package. It needs to raise an explicit failure.
I can get an error every time with:
soufi centos cracklib-dicts 2.9.0-11.el7
which usually results in the mirror server telling me to go forth and multiply:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='mirror.centos.org', port=80): Max retries exceeded with url: /centos/8.1.1911/os/x86_64/os/repodata/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f71cd105220>: Failed to establish a new connection: [Errno 111] Connection refused'))
This took around 6 minutes to get to this point from issuing the command.
Anyway, there's a second problem highlighted here. Even with the default caching that the CLI provides, it's not enough to avoid the wrath of the server bots. I think @0xDEC0DE you might need to get rid of the HEAD stuff and just attempt a straight fetch every time to reduce the querying.
Addessed in PR #22
The yum finder forks off a process to limit the memory leakage from
repomd
. However theget_repomd
function only catchesHTTPError
, which means the process can die with a Traceback and the behaviour of the other side of the process pipe assumes 100% success.This should catch
Exception
instead, to catch everything.