Commit graph

211 commits

Author SHA1 Message Date
Robin Roth
e8fdba7593 Zypper repository rewrite (#1990)
* Remove support for ancient zypper versions

Even SLES11 has zypper 1.x.

* zypper_repository: don't silently ignore repo changes

So far when a repo URL changes this got silently ignored (leading to
incorrect package installations) due to this code:

    elif 'already exists. Please use another alias' in stderr:
        changed = False

Removing this reveals that we correctly detect that a repo definition
has changes (via repo_subset) but don't indicate this as change but as a
nonexistent repo. This makes us currenlty bail out silently in the above
statement.

To fix this distinguish between non existent and modified repos and
remove the repo first in case of modifications (since there is no force
option in zypper to overwrite it and 'zypper mr' uses different
arguments).

To do this we have to identify a repo by name, alias or url.

* Don't fail on empty values

This unbreaks deleting repositories

* refactor zypper_repository module

* add properties enabled and priority
* allow changing of one property and correctly report changed
* allow overwrite of multiple repositories by alias and URL
* cleanup of unused code and more structuring

* respect enabled option

* make zypper_repository conform to python2.4

* allow repo deletion only by alias

* check for non-existant url field and use alias instead

* remove empty notes and aliases

* add version_added for priority and overwrite_multiple

* add version requirement on zypper and distribution

* zypper 1.0 is enough and exists

* make suse versions note, not requirement

based on comment by @alxgu
2016-04-18 17:47:17 +02:00
Jiri Tyr
3ba9e817fe Describing the _none_ value of the proxy option (#2053) 2016-04-18 11:01:24 -04:00
Michael Scherer
e8dbb4e4f2 Mark conf_file as a path, for various user expansion 2016-04-14 21:15:07 +02:00
Christopher M. Fuhrman
8c6a3e732e pkgin: Fix bad regexp which did not catch packages such as p5-SVN-Notify
The previous version of my regexp did not take into account packages
such as 'p5-Perl-Tidy' or 'p5-Test-Output', so use a greedy match up to
the last occurrance of '-' for matching the package.  This regex has
been extensively tested using all packages as provided by pkgsrc-2016Q1[1].

Footnotes:
[1]  http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/?only_with_tag=pkgsrc-2016Q1
2016-04-14 12:51:29 +02:00
Jasper Lievisse Adriaanse
2b8debbc2b Sprinkle some LANG/LC_* where command output is parsed (#2019) 2016-04-13 10:03:26 -04:00
Jasper Lievisse Adriaanse
85c1440ede Tweak and extend the pkgin module
- make path to pkgin a global and stop passing it around; it's not going
  to change while ansible is running
- add support for several new options:
  * upgrade
  * full_upgrade
  * force
  * clean
- allow for update_cache to be run in the same task as upgrading/installing
  packages instead of needing a separate task for that
2016-04-13 11:02:42 +02:00
Joerg Fiedler
44bfca315a add chroot flag to pkgng in order to allow installation of packages into chroot environments, e.g. jails (#1218) 2016-04-11 08:25:30 +02:00
René Moser
542a96f907 Merge pull request #1827 from jasperla/pkgin_update_cache
support for 'update_cache' in pkgin module
2016-04-10 22:49:31 +02:00
Michael Scherer
d9b8043b4a Use type='path' for reposdir, since that's a path 2016-03-30 21:49:58 +02:00
Jasper Lievisse Adriaanse
3e31c2408d support for 'update_cache' in pkgin module 2016-03-29 22:50:10 +02:00
Brian Coca
7ef09ac889 Merge pull request #1919 from mscherer/fix_portage
Use boolean instead of "yes" + choice for most option
2016-03-28 07:05:10 -07:00
Michael Scherer
9853caa536 Use boolean instead of "yes" + choice for most option
This enable a more standard behavior with others modules
2016-03-28 09:14:57 +02:00
Michael Scherer
2e8cd5cd74 Use type 'path' for rootdir, for pkgng 2016-03-27 21:08:05 +02:00
Brian Coca
3b95400a59 change name to be a list type
remove implicit split that expects a , separated string, let list type
deal with multiple possible compatible input types.
also removed unused imports
2016-03-23 12:21:03 -07:00
Matthew Gamble
a92a0e56f2 Remove dead code from pacman module
The manual check to see if get_bin_path() returned anything is
redundant, because we pass True to the required parameter of
get_bin_path(). This automatically causes the task to fail if the pacman
binary isn't available. Therefore, the code within the if statement
being removed is never called.
2016-03-23 18:39:26 +11:00
René Moser
af9aaed64c Merge pull request #1662 from saez0pub/devel
Prevent reinstallation in case of group package
2016-03-16 22:28:44 +01:00
Will Keeling
282deb3291 Better handling of package groups in pacman module 2016-03-08 20:24:11 +00:00
saez0pub
6c7be7d97d Prevent reinstallation in case of group package 2016-03-08 18:57:30 +01:00
Toshio Kuratomi
9835b6a477 Fail due to no dnf module installed earlier as we use a dnf utility function to determine if we have permission to install packages. 2016-03-04 09:43:23 -08:00
Jiri Tyr
012085263f Removing parameter from yum_repository module 2016-03-04 00:43:44 +00:00
Toshio Kuratomi
95d54004af Merge pull request #1772 from jtyr/jtyr-yumrepo_new_params
Adding more options to the yum_repository module
2016-03-03 15:59:49 -08:00
Brian Coca
f23baa2dda Merge pull request #1646 from k0ste/newfeature
pacman: fix recurse delete. Add force update_cache feature.
2016-03-03 18:16:09 -05:00
Jiri Tyr
23c4e8de4a Adding more options to the yum_repository module 2016-03-03 17:01:46 +00:00
Rene Moser
7c38f8ff75 doc: replace yumrepo with yum_repository 2016-02-29 23:40:00 +01:00
Rene Moser
c5fa64998c rename yumrepo to yum_repository 2016-02-29 23:37:46 +01:00
Jan Chaloupka
d011149baf dnf module: package not installed with state=latest
dnf: name=PACKAGE state=latest is reponsible for two use cases:
- to install a package if not already installed.
- to update the package to the latest if already installed.

The latter use cases is not handled properly as base.upgrade does not
throw dnf.exceptions.MarkingError if a package is not installed.

Setting base.conf.best = True ensures a package is installed or
updated to the latest when calling base.install.

Sign-off: jsilhan@redhat.com
Sign-off: jchaloup@redhat.com
2016-02-12 15:51:48 +01:00
Konstantin Shalygin
808177e2c9 Fix recurse delete. Add force update_cache feature. 2016-02-11 18:34:44 +06:00
Toshio Kuratomi
14a62fb5d6 Merge pull request #1415 from jtyr/jtyr-yumrepo_params
Adding params option into the yumrepo module
2016-02-02 13:53:39 -08:00
Toshio Kuratomi
b1e9dc0b52 Allow dnf to remove dependent packages of a package that is being removed
Fixes #1517
2016-02-02 10:40:38 -08:00
Jiri Tyr
7f918b375f Adding params option into the yumrepo module 2016-02-01 13:13:35 +00:00
Daniel Jakots
d24721f651 fix the spelling of vim's flavor in the example 2016-01-28 21:54:25 +01:00
Toshio Kuratomi
36be779888 Remove duplicate documentation fields 2016-01-28 09:20:55 -08:00
Brian Coca
ad2208c7b5 Merge pull request #1201 from bonds/devel
add ports support to openbsd_pkg
2016-01-19 09:11:41 -05:00
Scott Bonds
2b69a2b14c add python 2.5 requirement and ansible 2.1 version_added 2016-01-18 12:20:14 -08:00
Scott Bonds
5b555b9347 add ports support in openbsd_pkg 2016-01-15 13:19:54 -08:00
Brian Coca
3aa2d3744d Merge pull request #1482 from ansible/json-imports-fallback
Update for modules which import json.
2016-01-12 10:00:37 -05:00
Brian Coca
264a7c88f6 added missing version_added 2016-01-11 19:34:02 -05:00
Brian Coca
fe7ffc572a Merge pull request #1399 from dermute/pkgutil_v3
Added update_catalog and some error handling
2016-01-11 19:29:30 -05:00
Toshio Kuratomi
d6af6f8477 Update for modules which import json.
Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed

Fixes #1298
2016-01-11 13:06:22 -08:00
Brian Coca
a412ee7ed8 Merge pull request #1353 from mscherer/remove_unsafe_shell_pkgutil
Simplify the code and remove use_unsafe_shell=True
2016-01-04 08:58:21 -05:00
Alexander Winkler
389a1265de fixed inline for more compatibility 2015-12-29 08:02:13 +01:00
Matt Martz
4b9388ce99 Fix tabbed indentation in packaging/os/pkgutil.py 2015-12-22 15:38:03 -06:00
Michael Scherer
2f3dc1352f Replace choices=BOOLEANS by type='bool', fix #1326 2015-12-21 23:39:20 +01:00
Alexander Winkler
2586541ba1 Added update_catalog and some error handling 2015-12-18 12:56:45 +01:00
Marc Mettke
f0e0be0b21 Pacman Module Fixes
Update: query_package documentation
Fix: Number of Packages to Updated was one to high,
     'cause of counting the '\n'
Fix: Pacman was reinstalling state=latest packages,
     even when it was unable to load the remote version
2015-12-16 07:03:18 +01:00
Michael Scherer
fed6090e73 Simplify the code and remove use_unsafe_shell=True
While there is no security issue with this shell snippet, it
is better to not rely on shell and avoid use_unsafe_shell.
2015-12-10 01:02:15 +01:00
Brian Coca
f6a0fec577 Merge pull request #1261 from agx/zypper-rc-status
zypper: Add returncode to result
2015-12-08 17:19:42 -05:00
Brian Coca
c978f4b332 updated version added 2015-11-24 09:55:27 -08:00
Jiri tyr
b9bb6d8d29 Adding yumrepo module
This patch is adding a new module which allows to add and remove YUM
repository definitions. The module implements all repository options
as described in the `yum.conf` manual page.
2015-11-21 00:23:37 +00: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