From ebfb266f31046b5725a626beced278e67a33a7c3 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Fri, 1 Apr 2022 15:38:49 -0400 Subject: [PATCH] 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. --- pkgs/tools/virtualization/linode-cli/default.nix | 4 ++++ .../linode-cli/remove-update-check.patch | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/tools/virtualization/linode-cli/remove-update-check.patch diff --git a/pkgs/tools/virtualization/linode-cli/default.nix b/pkgs/tools/virtualization/linode-cli/default.nix index 6ba947fb2f5b..8484762e3896 100644 --- a/pkgs/tools/virtualization/linode-cli/default.nix +++ b/pkgs/tools/virtualization/linode-cli/default.nix @@ -33,6 +33,10 @@ buildPythonApplication rec { inherit sha256; }; + patches = [ + ./remove-update-check.patch + ]; + # remove need for git history prePatch = '' substituteInPlace setup.py \ diff --git a/pkgs/tools/virtualization/linode-cli/remove-update-check.patch b/pkgs/tools/virtualization/linode-cli/remove-update-check.patch new file mode 100644 index 000000000000..316d2855b1f4 --- /dev/null +++ b/pkgs/tools/virtualization/linode-cli/remove-update-check.patch @@ -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