summaryrefslogtreecommitdiffstats
path: root/debian/patches/remove_version_check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/remove_version_check.patch')
-rw-r--r--debian/patches/remove_version_check.patch18
1 files changed, 12 insertions, 6 deletions
diff --git a/debian/patches/remove_version_check.patch b/debian/patches/remove_version_check.patch
index c68c8aa..f55abd5 100644
--- a/debian/patches/remove_version_check.patch
+++ b/debian/patches/remove_version_check.patch
@@ -1,9 +1,11 @@
Description: Remove version check at runtime
Author: Samuel Henrique <samueloph@debian.org>
Forwarded: not-needed
+Index: ansible-lint/src/ansiblelint/config.py
+===================================================================
--- ansible-lint.orig/src/ansiblelint/config.py
+++ ansible-lint/src/ansiblelint/config.py
-@@ -265,53 +265,5 @@
+@@ -296,55 +296,5 @@ def get_deps_versions() -> dict[str, Ver
def get_version_warning() -> str:
@@ -11,6 +13,11 @@ Forwarded: not-needed
- # 0.1dev1 is special fallback version
- if __version__ == "0.1.dev1": # pragma: no cover
- return ""
+- pip = guess_install_method()
+- # If we do not know how to upgrade, we do not want to show any warnings
+- # about version.
+- if not pip:
+- return ""
-
- msg = ""
- data = {}
@@ -51,17 +58,16 @@ Forwarded: not-needed
- msg = "[dim]You are using a pre-release version of ansible-lint.[/]"
- elif current_version < new_version:
- msg = f"""[warning]A new release of ansible-lint is available: [red]{current_version}[/] → [green][link={html_url}]{new_version}[/][/][/]"""
--
-- pip = guess_install_method()
-- if pip:
-- msg += f" Upgrade by running: [info]{pip}[/]"
+- msg += f" Upgrade by running: [info]{pip}[/]"
-
- return msg
+ """Patched on Debian to not download release information from third parties"""
+ return ""
+Index: ansible-lint/test/test_main.py
+===================================================================
--- ansible-lint.orig/test/test_main.py
+++ ansible-lint/test/test_main.py
-@@ -48,7 +48,7 @@
+@@ -50,7 +50,7 @@ def test_call_from_outside_venv(expected
warning_found = "PATH altered to include" in proc.stderr
assert warning_found is expected_warning