summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package
Commit message (Collapse)AuthorAgeFilesLines
* mechanical conversion of most debug log statements to traceThom May2018-03-2627-116/+122
| | | | Signed-off-by: Thom May <thom@chef.io>
* rubocop fixes from engine bump to 0.54.0lcg/rubocop-fixesLamont Granquist2018-03-211-1/+1
| | | | | | some cops got a little stricter. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Just look for Yes and anything in the regexTim Smith2018-03-191-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Detect new "automatically" installed string in ZypperTim Smith2018-03-191-1/+1
| | | | | | | | | | This resolves issue #6836 which explains the issue in great detail. TLDR: Packages that are installed as deps on another package have a different string when you get info on them now. This updates the regex to detect both. Based on the zypper changelog I believe this was introduced in 1.13.17. Signed-off-by: Tim Smith <tsmith@chef.io>
* mangle array-of-strings here properlyjcowie_yum_refactorLamont Granquist2018-03-151-1/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* el6 fixesLamont Granquist2018-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add more tests, fix more subtle bugsLamont Granquist2018-03-151-2/+2
| | | | | | | we support locking based on provides lines, and now test that and ensure that locking checks go through name resolution properly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add a few lock/unlock tests and fix a bugLamont Granquist2018-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* bad copypasta is badLamont Granquist2018-03-151-5/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* check for multipackage locking/unlocking properlyLamont Granquist2018-03-151-2/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* update commentLamont Granquist2018-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add package locking back inLamont Granquist2018-03-152-2/+41
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add back default hash + commentLamont Granquist2018-03-151-1/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix yum_cache arch options and use positional parametersLamont Granquist2018-03-153-12/+12
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add specs for YumCache fascadeLamont Granquist2018-03-152-6/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix typo in method declarationsLamont Granquist2018-03-151-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add comment warning people to not use these utilitiesLamont Granquist2018-03-151-1/+10
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add pacakge_available? and version_available?Lamont Granquist2018-03-151-1/+11
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* allow using yum_package explicitly on non-linux O/SenLamont Granquist2018-03-151-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Yum package provider rewriteLamont Granquist2018-03-1516-1028/+1919
| | | | | | squash and rebase of all the work Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #6955 from coderanger/gem-installed-versionsLamont Granquist2018-03-121-10/+18
|\ | | | | Rework installed_versions for newer Rubygems
| * Feed the Rubocop.Noah Kantrowitz2018-03-071-1/+1
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * Fixes for bundler being a default gem so we can still manage it with ↵Noah Kantrowitz2018-03-061-10/+18
| | | | | | | | | | | | | | | | gem_package. Reworks the install_versions loading code to reach into more specific internals for the data we want. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | Remove a few more provides and update the resolver specTim Smith2018-03-071-1/+1
| | | | | | | | | | | | We need to rethink this spec. The 1:1 mapping stuff doesn't seem like it has a lot of value. The portion below where we test 1:many mappings seem to be the value. I want to know the right thing mapped to package, service, or user on Debian XYZ. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove platfom restrictions in provides and don't require providersTim Smith2018-03-0712-13/+12
| | | | | | | | | | | | Don't require providers in the resources since we map these automatically. Also remove or simplify the platform restrictions in the provides lines in the resources. We're not really getting anything from these the way we wire up resources. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Rename bff provider to match its resourceTim Smith2018-03-061-2/+2
|/ | | | | | We have the bff resource and the aix provider. Rename the provider to to bff as well. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6903 from chef/portageThom May2018-03-051-1/+1
|\ | | | | Modernize provides in the portage_package resource
| * Remove the provider check in the portage resourceportageTim Smith2018-02-261-1/+1
| | | | | | | | | | | | | | We're not doing this in other resources and we let Chef handle it all with provides now Signed-off-by: Tim Smith <tsmith@chef.io>
* | fix typo in macports error handlingMärt Bakhoff2018-03-041-1/+1
| | | | | | | | (obvious fix)
* | Remove the :uninstall action from chocolatey_package - CHEF-21remove_choco_uninstallTim Smith2018-02-281-8/+0
|/ | | | | | | Remove the previously deprecated :uninstall action for chocolatey_package. This is noted in CHEF-21 Signed-off-by: Tim Smith <tsmith@chef.io>
* fix chefstyle errorsTor Magnus Rakvåg2018-02-121-1/+1
| | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* add source paramTor Magnus Rakvåg2018-02-121-0/+5
| | | | Signed-off-by: Tor Magnus Rakvåg tm@intility.no
* create function to build powershell callsTor Magnus Rakvåg2018-02-121-7/+17
| | | | Signed-off-by: Tor Magnus Rakvåg tm@intility.no
* remove excess whitespaceTor Magnus Rakvåg2018-02-081-2/+2
| | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* simplified powershell_out callsTor Magnus Rakvåg2018-02-081-5/+5
| | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* Ensure that we only set config file options if necessarytm/apt_debconf_promptsThom May2018-01-301-6/+7
| | | | | | | | - If the user has already set some options, trust that they know what they're doing - Bonus fixup of the apt_package provider tests. Signed-off-by: Thom May <thom@chef.io>
* remove unnecessay quotes that caused problemsCam Cope2018-01-301-2/+2
|
* convert to arrays, fix logic gatingCam Cope2018-01-301-4/+6
|
* Avoid apt (dpkg) prompts for modified config filesCam Cope2018-01-301-1/+12
|
* Ensure package (un)locking is idempotentAndy Wagner2018-01-043-21/+9
| | | | | | | | | | | | | | | Due to the nature of the comparison done, the `package_locked` methods will always return false as they presume the package name is a string, when it is in fact always coerced into an array. Additionally in situations where the package_name is set rather than being inherited from the package resource's name, it will always return false. Resolves #6361 Resolves #6493 Signed-off-by: Andy Wagner <andy@andywagner.ca>
* Set smartos_package back to platform_familysimplify_providesTim Smith2018-01-021-2/+2
| | | | | | | | It's the same thing and our tests are constructed in a way that platform_family is necessary here. It's not worth unravelling that to use platform here Signed-off-by: Tim Smith <tsmith@chef.io>
* Just use platform for smartos as wellTim Smith2017-12-221-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Don't check both platform_family / os in provides when platform_family will doTim Smith2017-12-211-1/+1
| | | | | | We're already going specific enough here to identify the platform_family. Debian is always going to be on Linux and SmartOS on Solaris2. Don't both checking both. Signed-off-by: Tim Smith <tsmith@chef.io>
* Cleanup some YARD warningsyard2Tim Smith2017-12-131-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Avoid the need to parse nil versions in the package providerTim Smith2017-11-032-4/+24
| | | | | | | | | | | | | | | | | If we don't have a version installed yet we shouldn't go do a version comparison with nil. No matter what that's a waste of time and in dpkg/apt it's going to require shelling out now. Instead just do the install. This also adds the same version comparison method to the dpkg resource. At the moment it doesn't look like this is going to get called since our upgrade action there is a bit broken (doesn't actually compare versions), but that's going to get fixed next. This also cleans up the version comparison to make sure we're always dealing with strings Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix the invalid version comparison of apt packages.pr/6554Takuto Komazaki2017-11-021-4/+9
| | | | | | | | | | | | | | | The strings of dpkg versions are more complex than the Gem::Version and not compatible with it. Using Gem::Version to compare versions of dpkg packages will cause mistakes or raise the exeption of 'Malformed version number..'. please see a simple example: https://gist.github.com/komazarari/c6b33b29a0e31e9c62bbc2f0b2091647 Prefer to use the dpkg cli. https://debian-handbook.info/browse/en-US/stable/sect.manipulating-packages-with-dpkg.html Signed-off-by: Takuto Komazaki <komazarari@gmail.com>
* Merge pull request #6437 from MsysTechnologiesllc/dh/array_choco_pkg_artifactoryBryan McLellan2017-10-161-8/+13
|\ | | | | [MSYS-647] array support for choco pkg from artifactory
| * update code to fix appveyor issuesAdministrator2017-10-051-10/+3
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Fix review commentsdheerajd-msys2017-09-291-26/+8
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Fix dependent packagedheerajd-msys2017-09-291-7/+12
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>