14ef6d2b51
- splitting out the susemanager integration plugins into their own subpackages. ATM this only contains the zypp plugin to tell susemanager about manually installed packages. - Unit and integration tests fixes for 2016.3.2 Add: * 0018-Unit-tests-fixes-for-2016.3.2.patch * 0019-Fix-snapper_test-for-python26.patch * 0020-Integration-tests-fixes-for-2016.3.2.patch - Prevent pkg.install failure for expired keys (bsc#996455) Add: * 0017-Check-for-single-quote-before-splitting-on-single-qu.patch - Required D-Bus and generating machine ID where it is missing - Fix sphinx crashes when documentation is being generated Add script for documentation update. Add: * 0016-Improve-Mock-to-be-flexible-and-able-to-mock-methods.patch * update-documentation.sh - Fix pkg.installed refresh repo failure (bsc#993549) Fix salt.states.pkgrepo.management no change failure (bsc#990440) Add: * 0014-Add-ignore_repo_failure-option-to-suppress-zypper-s-.patch * 0015-Remove-zypper-s-raise-exception-if-mod_repo-has-no-a.patch - Deprecate status.uptime one version later Add: OBS-URL: https://build.opensuse.org/request/show/430691 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=77
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From c80528b9aad5305b06a07cadf752a45392d4a147 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
|
<psuarezhernandez@suse.com>
|
|
Date: Tue, 24 May 2016 11:01:55 +0100
|
|
Subject: [PATCH 08/12] checksum validation when zypper pkg.download
|
|
|
|
check the signature of downloaded RPM files
|
|
|
|
bugfix: showing errors when a package download fails using zypper pkg.download
|
|
|
|
Renamed check_sig to checksum and some refactoring
|
|
|
|
simpler rpm.checksum function
|
|
---
|
|
salt/modules/zypper.py | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
|
|
index 92c604e..547d72b 100644
|
|
--- a/salt/modules/zypper.py
|
|
+++ b/salt/modules/zypper.py
|
|
@@ -1596,14 +1596,17 @@ def download(*packages, **kwargs):
|
|
pkg_ret = {}
|
|
for dld_result in __zypper__.xml.call('download', *packages).getElementsByTagName("download-result"):
|
|
repo = dld_result.getElementsByTagName("repository")[0]
|
|
+ path = dld_result.getElementsByTagName("localfile")[0].getAttribute("path")
|
|
pkg_info = {
|
|
'repository-name': repo.getAttribute('name'),
|
|
'repository-alias': repo.getAttribute('alias'),
|
|
+ 'path': path,
|
|
}
|
|
key = _get_first_aggregate_text(
|
|
dld_result.getElementsByTagName('name')
|
|
)
|
|
- pkg_ret[key] = pkg_info
|
|
+ if __salt__['lowpkg.checksum'](pkg_info['path']):
|
|
+ pkg_ret[key] = pkg_info
|
|
|
|
if pkg_ret:
|
|
failed = [pkg for pkg in packages if pkg not in pkg_ret]
|
|
--
|
|
2.8.2
|
|
|