Commit graph

22 commits

Author SHA1 Message Date
Robin Roth
584a06eec7 zypper cleanup checks for failure/diff (#2569)
* zypper cleanup checks for failure/diff

* move check for changed/failed from functions back to main
* handle all cases identially
* generate diff together

* fix module name
2016-07-16 09:38:30 +02:00
Andrii Radyk
f2b255ffa3 Add zypper refresh support in zypper module (#2411)
* added zypper refresh support

* removed trailing symbols
* added forced zypper refresh support similar to update_cache for apt module

* removed unnecessary blocks and cleaned up the logic for refresh

* added update_cache as alias for refresh to be similar to apt/yum module

* update zypper module according to comments
2016-07-13 08:28:05 +02:00
Alex
ce5a9b6c5f zypper: (Bugfix) Change command option --verbose to --details which is supported since 2008 (#2224) 2016-05-19 08:21:33 +02:00
Robin Roth
bb68df525c refactor zypper module
* refactor zypper module

Cleanup:
* remove mention of old_zypper (no longer supported)
  * requirement goes up to zypper 1.0, SLES 11.0, openSUSE 11.1
  * allows to use newer features (xml output)
  * already done for zypper_repository
* use zypper instead of rpm to get old version information, based on work by @jasonmader
* don't use rpm, zypper can do everything itself
* run zypper only twice, first to determine current state, then to apply changes

New features:
* determine change by parsing zypper xmlout
* determine failure by checking return code
* allow simulataneous installation/removal of packages (using '-' and '+' prefix)
  * allows to swap out alternatives without removing packages depending
    on them
* implement checkmode, using zypper --dry-run
* implement diffmode
* implement 'name=* state=latest' and 'name=* state=latest type=patch'
* add force parameter, handed to zypper to allow downgrade or change of vendor/architecture

Fixes/Replaces:
* fixes #1627, give changed=False on installed patches
* fixes #2094, handling URLs for packages
* fixes #1461, fixes #546, allow state=latest name='*'
* fixes #299, changed=False on second install, actually this was fixed earlier, but it is explicitly tested now
* fixes #1824, add type=application
* fixes #1256, install rpm from path, this is done by passing URLs and paths directly to zypper

* fix typo in package_update_all

* minor fixes

* remove commented code block
* bump version added to 2.2
* deal with zypper return codes 103 and 106
2016-05-04 07:47:47 +02:00
Toshio Kuratomi
36be779888 Remove duplicate documentation fields 2016-01-28 09:20:55 -08:00
Guido Günther
11e8a17684 zypper: Add returncode to result
This will be used in integration tssts and makes the whole thing
more similar to the yum module.
2015-11-18 17:49:34 +01:00
Robin Roth
9f02fbe072 better cope with rpm not returning package name
if the rpm query is missing a package name (or giving some error): fail soft

before the patch: the module fails because the installed_state dict is missing the package name

after the patch: the missing package is assumed to not be in the correct state and is installed/removed with zypper
2015-11-11 11:57:11 +01:00
Brian Coca
3925b64d17 Merge pull request #371 from M0ses/devel
fix errorhandling in zypper.py module
2015-10-23 10:36:40 -04:00
Alexander Gubin
5eec20df56 zypper: Add local/remote rpm installation
Add remote rpm example
2015-07-27 10:45:50 +02:00
Greg DeKoenigsberg
004dedba8a Changes to author formatting, remove emails 2015-06-16 14:32:39 -04:00
Brian Coca
08445418aa more string corrections 2015-05-14 10:45:32 -04:00
Greg DeKoenigsberg
a92f5b657a Adding author's github id 2015-05-14 00:39:02 -04:00
Brian Coca
698098ae57 doc update for zypper 2015-04-16 09:45:23 -04:00
Gregory Haynes
44280e461c Add type property to zypper
To install patterns and other package types a type parameter needs to be
specified to zypper.
2015-04-02 14:08:42 -07:00
M0ses
f8045f4574 fix errorhandling in zypper.py module
package_latest was calling package_present but did not care
about the return code so errors in package_present were hidden
and everthing look ok on the console when zypper update did not fail,
but no packages where installed.
2015-04-02 19:04:56 +02:00
Brian Coca
512c684b52 Merge pull request #128 from robinro/patch_multiple_versions_rpm_zypper
Patch multiple versions rpm zypper
2015-03-31 23:56:28 -04:00
Robin Roth
23495a16f4 fixed tab/space mix 2015-01-29 10:32:09 +01:00
Alexander Gubin
50a8774784 zypper: Fix gpg check option for state=latest. --no-gpg-checks is used in new and old zypper versions 2014-12-16 14:35:46 +01:00
Robin Roth
7948b91bad fix local change 2014-12-04 11:28:18 +01:00
Robin Roth
76142ddb97 Allow multiple versions in rpm state
Fix bug in ansible get_package_state and get_current_version that breaks when there are multiple versions of a package installed and there is a list of packages to install.
The previous implementation used 'zip' to match requested names to installed names which fails, because rpm outputs multiple lines per package when there are multiple versions.

Testcase: Install opensuse, install multiple kernel versions (happens by update)
Before patch: calling 
zypper: state=present for name={{item}} 
with_items: 
  - kernel-desktop
  - git

leads to ansible aborting.
After the patch ansible performs as expected and makes sure both packages are present.
Also the last version number is used for further update information in this version (before if only one package name was given the oldest version number was used).
2014-12-04 11:25:06 +01:00
Artem Chernikov
5a8652e7bc Fixing SuSE to SUSE as latter is the right one since some time 2014-11-10 17:42:43 +01:00
Michael DeHaan
7e6fc7023d Reorganization. 2014-11-04 17:31:59 -05:00
Renamed from packaging/zypper.py (Browse further)