Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salt.modules.pkgng: Fix incorrect usage of _pkg() #33648

Merged
merged 1 commit into from
Jun 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions salt/modules/pkgng.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def _get_pkgng_version(jail=None, chroot=None):
'''
return the version of 'pkg'
'''
return __salt__['cmd.run']([_pkg(jail, chroot), '--version']).strip()
cmd = _pkg(jail, chroot) + ['--version']
return __salt__['cmd.run'](cmd).strip()


def _get_version(name, results):
Expand Down Expand Up @@ -287,9 +288,9 @@ def latest_version(*names, **kwargs):
for name in names:
# FreeBSD supports packages in format java/openjdk7
if '/' in name:
cmd = [_pkg(jail, chroot), 'search']
cmd = _pkg(jail, chroot) + ['search']
else:
cmd = [_pkg(jail, chroot), 'search', '-S', 'name', '-Q', 'version', '-e']
cmd = _pkg(jail, chroot) + ['search', '-S', 'name', '-Q', 'version', '-e']
if quiet:
cmd.append('-q')
cmd.append(name)
Expand Down