linode-cli: Remove update check

Upon every API call, this program will check the API version and make a
request to PyPi to check the latest version and, if not latest, will
show a warning like

> The API responded with version 1.2.4, which is newer than the CLI's
> version of 1.2.3.  Please update the CLI to get access to the newest
> features.  You can update with a simple `pip install --upgrade
> linode-cli`

This is not really useful with Nix, as the update message is wrong. And
connecting to a third-party on each usage is not desired, either.
This commit is contained in:
Andrew Marshall 2022-04-01 15:38:49 -04:00
parent 33b06498b0
commit ebfb266f31
2 changed files with 15 additions and 0 deletions

View file

@ -33,6 +33,10 @@ buildPythonApplication rec {
inherit sha256;
};
patches = [
./remove-update-check.patch
];
# remove need for git history
prePatch = ''
substituteInPlace setup.py \

View file

@ -0,0 +1,11 @@
--- a/linodecli/cli.py
+++ b/linodecli/cli.py
@@ -555,7 +555,7 @@
if self.debug_request:
self.print_response_debug_info(result)
- if not self.suppress_warnings:
+ if False:
# check the major/minor version API reported against what we were built
# with to see if an upgrade should be available
api_version_higher = False