Repository navigation
Fixes #34767 - #34768
Fixes #34767#34768
Conversation
|
@hrumph Would you mind fixing this whitespace error, please? https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/3438/violations/file/salt/states/pkg.py/ |
|
Last commit was needed because it's not only the call to pkg.installed that might cause a refresh so, the test for refreshed had to be moved to the outer-most nesting level. |
|
@terminalmage Could you take a look here as well please? |
| if not isinstance(version, six.string_types) and version is not None: | ||
| version = str(version) | ||
|
|
||
| refreshed = False |
There was a problem hiding this comment.
Can we use something other than refreshed here? It's too close to refresh and will be confusing to maintain.
There was a problem hiding this comment.
Maybe already_refreshed?
There was a problem hiding this comment.
That sounds good to me. We'll go with that.
There was a problem hiding this comment.
@terminalmage, would you be ok with "was_refreshed"? That way when we do the test we'll end up seeing
if os.path.isfile(rtag) and was_refreshed:
I think that "was_refreshed" captures the meaning a bit more. However, if you still insist on "already_refreshed" I'll go with that, as I said.
There was a problem hiding this comment.
Sure, that'd be fine. That makes it sufficiently different from "refresh", I think.
|
Yo @cachedout this is ready to roll. |
Move refreshed or refresh to different spot (just for code tidyness)
|
Hi @cachedout. For good measure, I put the pkg.latest version in a try/except (same as is don in the "latest" function, and I also moved one line of code to a better stop (from the point of view of code elegance). Can you please merge this soon? |
|
@cachedout is there some reason why this isn't getting merged? |
|
Hi @hrumph. Sorry this fell off my radar. Thanks for the bump. I'm looking at it now. |
|
Go Go Jenkins! |
|
@cachedout is there some reason why this can't be merged? I don't know what the failed tests mean. |
|
@cachedout why no merge? |
|
@cachedout can you give me some idea of what the typical merge schedule is? I would have thought that fixes for anything should get priority over all other pr's. |
|
@terminalmage can you help me to get this thing merged? |
|
@hrumph Sorry, we've been quite busy working on the upcoming Carbon release, so this took longer to get merged than we would have hoped. |
What does this PR do?
Makes sure that pkg.installed works in accordance with the docs when it comes to refreshing the pkg db in Windows. Even if, for some reason, it's not a perfect fix it will only improve things, and it shouldn't break anything non-Windows.
What issues does this PR fix or reference?
#34767
Tests written?
No