Accepting request 838781 from home:glaubitz:branches:Cloud:Tools
- New upstream release + Version 2.12.1 + For detailed information about changes see the HISTORY.rst file provided with this package - Add patch to disable automatic check for updates (boo#1175289) + acc_disable-update-check.patch OBS-URL: https://build.opensuse.org/request/show/838781 OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/azure-cli-core?expand=0&rev=45
This commit is contained in:
parent
d087b0119a
commit
89fb3314c6
42
acc_disable-update-check.patch
Normal file
42
acc_disable-update-check.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff -Nru azure-cli-core-2.12.1.orig/azure/cli/core/util.py azure-cli-core-2.12.1/azure/cli/core/util.py
|
||||
--- azure-cli-core-2.12.1.orig/azure/cli/core/util.py 2020-09-28 10:37:30.000000000 +0200
|
||||
+++ azure-cli-core-2.12.1/azure/cli/core/util.py 2020-09-30 14:51:49.700308773 +0200
|
||||
@@ -331,37 +331,7 @@
|
||||
|
||||
|
||||
def show_updates_available(new_line_before=False, new_line_after=False):
|
||||
- from azure.cli.core._session import VERSIONS
|
||||
- import datetime
|
||||
-
|
||||
- if VERSIONS[_VERSION_CHECK_TIME]:
|
||||
- version_check_time = datetime.datetime.strptime(VERSIONS[_VERSION_CHECK_TIME], '%Y-%m-%d %H:%M:%S.%f')
|
||||
- if datetime.datetime.now() < version_check_time + datetime.timedelta(days=7):
|
||||
- return
|
||||
-
|
||||
- _, updates_available_components = get_az_version_string(use_cache=True)
|
||||
- if updates_available_components:
|
||||
- if new_line_before:
|
||||
- logger.warning("")
|
||||
- show_updates(updates_available_components)
|
||||
- if new_line_after:
|
||||
- logger.warning("")
|
||||
- VERSIONS[_VERSION_CHECK_TIME] = str(datetime.datetime.now())
|
||||
-
|
||||
-
|
||||
-def show_updates(updates_available_components):
|
||||
- if updates_available_components is None:
|
||||
- logger.warning('Unable to check if your CLI is up-to-date. Check your internet connection.')
|
||||
- elif updates_available_components: # pylint: disable=too-many-nested-blocks
|
||||
- if in_cloud_console():
|
||||
- warning_msg = 'You have %i updates available. They will be updated with the next build of Cloud Shell.'
|
||||
- else:
|
||||
- warning_msg = "You have %i updates available."
|
||||
- if CLI_PACKAGE_NAME in updates_available_components:
|
||||
- warning_msg = "{} Consider updating your CLI installation with 'az upgrade'".format(warning_msg)
|
||||
- logger.warning(warning_msg, len(updates_available_components))
|
||||
- else:
|
||||
- print('Your CLI is up-to-date.')
|
||||
+ return
|
||||
|
||||
|
||||
def get_json_object(json_string):
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f861c57b59040d1a85320001e3c1a2d0e99f044f29d89abc13973be811f3f366
|
||||
size 146560
|
3
azure-cli-core-2.12.1.tar.gz
Normal file
3
azure-cli-core-2.12.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b2282e6ae3d366c8d0728dc38c13cd958df053a0e554b8b2c883b809dc664e6a
|
||||
size 146622
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 30 12:53:01 UTC 2020 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- New upstream release
|
||||
+ Version 2.12.1
|
||||
+ For detailed information about changes see the
|
||||
HISTORY.rst file provided with this package
|
||||
- Add patch to disable automatic check for updates (boo#1175289)
|
||||
+ acc_disable-update-check.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 22 10:47:00 UTC 2020 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: azure-cli-core
|
||||
Version: 2.12.0
|
||||
Version: 2.12.1
|
||||
Release: 0
|
||||
Summary: Microsoft Azure CLI Core Module
|
||||
License: MIT
|
||||
@ -25,6 +25,7 @@ Group: System/Management
|
||||
URL: https://github.com/Azure/azure-cli
|
||||
Source: https://files.pythonhosted.org/packages/source/a/azure-cli-core/azure-cli-core-%{version}.tar.gz
|
||||
Source1: LICENSE.txt
|
||||
Patch0: acc_disable-update-check.patch
|
||||
BuildRequires: azure-cli-nspkg
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -79,6 +80,7 @@ Microsoft Azure CLI Core Module
|
||||
|
||||
%prep
|
||||
%setup -q -n azure-cli-core-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
install -m 644 %{SOURCE1} %{_builddir}/azure-cli-core-%{version}
|
||||
|
Loading…
Reference in New Issue
Block a user