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

detect already installed packages on webpi source #33

Closed

Conversation

brettporter
Copy link

This change ensures that packages using source => webpi do not get marked as created on every Puppet execution, by detecting they are already installed.

The parsing is a little crude but should work. I've submitted chocolatey-archive/chocolatey#521 to avoid the need to exclude Available Products at some future time.

Note that this doesn't list the packages in self.instances. I'm not sure what the impact of that is for the provider. The only way I could think of addressing that is to split webpi into a separate provider, where every operation uses -source webpi. This might make sense as a next step regardless, so that it can have correct capabilities (e.g., latest also doesn't make sense on webpi, and it is not versionable). Would that be a change you'd consider?

return nil
end
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably okay performance-wise. Granted it would be nice to cache this the first time this was called so it's only called once.

@ferventcoder
Copy link
Contributor

@brettporter Can you start looking at 0.9.10 (it's in alpha) and seeing how this applies again?

@ferventcoder
Copy link
Contributor

This depends on chocolatey/choco#14 (which is part of 0.9.10)

@brettporter
Copy link
Author

Sorry @ferventcoder - I stopped working on the project that needed this, and I'm not setup to try it out again.

ferventcoder pushed a commit to ferventcoder/puppet-chocolatey that referenced this pull request Jul 26, 2016
…40/windows/add_json_pure_restriction

(MODULES-3640) Update modulesync 30fc4ab
@ferventcoder
Copy link
Contributor

Closing this for now. If at some point in the future you want to pick this up (which now it may not be necessary as choco may be able to detect something is already installed through webpi), please feel free to file a new PR. It may be better to ensure this functionality in Chocolatey itself though instead of in the provider. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants