Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:yukoff:openSUSE:Leap:42.1:Backports
salt.4302
zypper_pkgrepo.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File zypper_pkgrepo.patch of Package salt.4302
From d167a6b83d11702be012f69563be02c2efdf1650 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos <tampakrap@gmail.com> Date: Thu, 12 Nov 2015 12:04:11 +0100 Subject: [PATCH] Add support for priority and humanname in pkrepo zypper backend humanname is zypper ar --name priority is zypper mr -p both are quite important arguments for setting zypper repositories that were silently ignored. This commit introduces support on them so that pkgrepo will properly act on them Signed-off-by: Marcus Rueckert <mrueckert@suse.com> Signed-off-by: Bo Maryniuk <bmaryniuk@suse.com> Signed-off-by: Theo Chatzimichos <tchatzimichos@suse.com> --- salt/modules/zypper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py index 330bf48..ef6ac48 100644 --- a/salt/modules/zypper.py +++ b/salt/modules/zypper.py @@ -32,6 +32,7 @@ ZYPP_HOME = '/etc/zypp' LOCKS = '{0}/locks'.format(ZYPP_HOME) REPOS = '{0}/repos.d'.format(ZYPP_HOME) +DEFAULT_PRIORITY = 99 # Define the module's virtual name __virtualname__ = 'pkg' @@ -502,6 +503,12 @@ def mod_repo(repo, **kwargs): if kwargs.get('gpgautoimport') is True: cmd_opt.append('--gpg-auto-import-keys') + if 'priority' in kwargs: + cmd_opt.append("--priority='{0}'".format(kwargs.get('priority', DEFAULT_PRIORITY))) + + if 'humanname' in kwargs: + cmd_opt.append("--name='{0}'".format(kwargs.get('humanname'))) + if cmd_opt: __salt__['cmd.run'](('zypper -x mr {0} \'{1}\''.format(' '.join(cmd_opt), repo)), output_loglevel='trace')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor