From 050cf7b4ca4a490e02b49edcaca4947cce5863ee Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 29 Jun 2015 16:40:06 -0500 Subject: [PATCH] Fix binary package caching This issue was introduced in develop and does not exist in an officially-released version of Salt. --- salt/modules/pkg_resource.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/salt/modules/pkg_resource.py b/salt/modules/pkg_resource.py index dc80b2709a..45e3fbf1d8 100644 --- a/salt/modules/pkg_resource.py +++ b/salt/modules/pkg_resource.py @@ -136,16 +136,12 @@ def parse_targets(name=None, for pkg_name, pkg_src in six.iteritems(sources): if __salt__['config.valid_fileproto'](pkg_src): # Cache package from remote source (salt master, HTTP, FTP) and - # append a tuple containing the cached path along with the - # specified version. - srcinfo.append(( - __salt__['cp.cache_file'](pkg_src[0], saltenv), - pkg_src[1] - )) + # append the cached path. + srcinfo.append(__salt__['cp.cache_file'](pkg_src, saltenv)) else: # Package file local to the minion, just append the tuple from # the pack_sources() return data. - if not os.path.isabs(pkg_src[0]): + if not os.path.isabs(pkg_src): raise SaltInvocationError( 'Path {0} for package {1} is either not absolute or ' 'an invalid protocol'.format(pkg_src[0], pkg_name) @@ -164,7 +160,7 @@ def parse_targets(name=None, return packed, 'repository' else: - log.error('No package sources passed to pkg.install.') + log.error('No package sources provided') return None, None