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

The hold argument is broken for pkg.installed #13352

Closed
ryan-lane opened this Issue Jun 10, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@ryan-lane
Contributor

ryan-lane commented Jun 10, 2014

When using hold, I'm getting the following error:

          ID: Ensure mypackage is installed
    Function: pkg.installed
        Name: mypackage
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/srv/saltdev/salt/state.py", line 1492, in call
                  **cdata['kwargs'])
                File "/srv/saltdev/salt/states/pkg.py", line 659, in installed
                  hold_ret = __salt__['pkg.hold'](name=name, pkgs=pkgs, sources=sources)
                File "/srv/saltdev/salt/modules/aptpkg.py", line 639, in hold
                  ret[pkg].update(changes=result[pkg], result=True)
              KeyError: 'mypackage'
     Started: 00:29:14.559421
     Duration: 313 ms
     Changes:
Ensure mypackage is installed:
  pkg.installed:
    - name: mypackage
    - version: 1.0
    - hold: True
    - refresh: True
@ryan-lane

This comment has been minimized.

Contributor

ryan-lane commented Jun 10, 2014

This is in the develop branch.

@basepi

This comment has been minimized.

Member

basepi commented Jun 10, 2014

This could be related to #13293

@basepi basepi added Bug labels Jun 10, 2014

@basepi basepi added this to the Approved milestone Jun 10, 2014

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 10, 2014

Doubtful. It likely existed before that. I didn't actually modify any of the logic in that block, just renamed a variable.

@ryan-lane can you use the commands #13293 (comment) to check out the branch from that pull request and see if you still get the traceback? I'm guessing you'll still see it.

@ryan-lane

This comment has been minimized.

Contributor

ryan-lane commented Jun 10, 2014

@terminalmage Tried it with your branch and still got the error.

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 10, 2014

Thought so. I'll take a look.

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 10, 2014

@ryan-lane I updated that branch in my fork, can you test again? It should work now.

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 10, 2014

Fix for this is in #13366

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 10, 2014

I spoke to @ryan-lane and confirmed that the issue was fixed. Since #13366 has been merged, I'll close this issue.

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment