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
state pkg.installed not working on FreeBSD when version is specified #55630
Comments
@angeloudy what version were you previously on? |
@waynew |
This issue is addressed by PR #54074 . However, I don't think that the currently posted PR contains the best possible solution. |
I'm working on verifying this, still getting Salt up & running on a BSD box. |
I was able to reproduce this, and discovered the actual cause (discussed at #54074). There's a bit more digging to decide on the appropriate fix, but for a workaround, one could patch https://github.com/saltstack/salt/blob/4fed7e0/salt/states/pkg.py#L1844-L1845 I'm not sure why that was introduced a very long time ago, but it appears that the |
I think I know why that change was introduced. Every FreeBSD port has an "origin", which is basically the category of the port. Categories include stuff like "graphics", "devel", "astro", etc. Though rare, two ports can have the same name but different origins. Examples include devel/atlas and math/atlas or multimedia/dragon and devel/dragon. When installing such a port through pkg(8), you must specify the origin in order to unambiguously identify the correct package. So I would say we cannot simply remove the two lines that set |
@asomers that makes a lot of sense. I wonder - would it make sense to allow passing Another thought is that if we can unambiguously return an installed version there's really no reason for us to require a |
My idea is to replace |
Is there an expected timeline for this? |
@fzipi I don't have any time allocated for it right now. |
zd-4827 |
So the workaround in #55630 (comment) does work, however, it introduces other issues. So it is correct that is not a valid fix. Issue created by the workaround.
|
@krionbsd is looking into this one |
this still needs a test case written, I removed |
I have the following state file.
It worked fine for two year until I recently upgraded salt to 2019.2.2
When I run it in debug mode, I got the following message:
It seems that salt was trying to compare a
dict
withstr
and decided that it didn't match.Versions Report
The text was updated successfully, but these errors were encountered: