bradford-smith94/informant

Informant prevents installation from local cache if there is no internet connection

Closed this issue · 2 comments

Zoddo commented

Trying to reinstall a package from the local cache without internet connection (I broke systemd-networkd...), Informant popped up with the following error:

: Running pre-transaction hooks...
(1/2) Checking Arch News with Informant ...
Unable to read cache informantion: HTTPSConnectionPool(host='archlinux.org', port=443): Max retries exceeded with url: /feeds/news/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1ee58406a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Encountered feed error: <urlopen error [Errno -2] Name or service not known>
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

I think informant should only warn without preventing the installation if it cannot retrieve the RSS feed (at least when doing a local installation, but I don't think this can be easily detected).

Yeah, definitely not ideal.

I don't think the pacman hook can detect that packages are only being installed from the cache. Which leaves us with informant itself figuring out if we're only installing from the cache. Maybe the pacman detection code can be modified to check for a pacman -U call?

Or maybe informant should simply warn when it can't retrieve feeds regardless of local installation or not.

Zoddo commented

Sorry, I missed your comment.

I think the latter would be enough :)