This enables apt and dpkg providers to install virtual packages.
There is an attribute named allow_virtual which by default is set to true which enables the functionality to install virtual packages, the same behaviour can be found for rpm provider.
This enables apt and dpkg providers to install virtual packages. There is an attribute named allow_virtual which by default is set to true which enables the functionality to install virtual packages, the same behaviour can be found for rpm provider.
If a package that is defined as virtual by default it will search a real package on that system. Example for virtual package named rubygems {{code}} package { 'rubygems': ensure => 'latest' } {{code}} It will find ruby as the real package and it will be installed instead of rubygems. Note: this also can do unwanted behaviour if someone wants to uninstall a virtual package Example {{code}} package {'rubygems': ensure => 'absent' } {{code}} This by default will remove ruby package.
If the user don't want this functionality it can be done by setting the attribute allow_virtual to false. Example: {{code}} package {'rubygems': ensure => 'absent' allow_virtual => false } {{code}}
Mihai Buzgau, you mentioned that "the same behaviour can be found for rpm provider." Just to clarify, you mean that this setting already existed for the rpm provider?
Mihai BuzgauAlexandru Popa since this issue was released in 6.8.0, please leave this resolved and open a new ticket to add the virtual package support.
George Mrejea This is another case where commits for this ticket landed in 5.5.x and 6.4.x, but the original regression and the fix were resolved before 5.5.17 and 6.4.4 releases. So from the user's perspective, the bug never affected the 5.5.x and 6.4.x streams, and we don't want to tag this ticket with those fix versions.
This seems to be a problem for the rubygems package, particularly in Debian / Ubuntu. I linked to a couple older tickets where this is reported as a minor issue with no workaround.
*UPDATE*
This issue added virtual package support for apt & dpkg, but it caused the default value of the {{virtual}} parameter to change from false to true in 6.8.0. The code was reverted in 6.8.1, so puppet does not currently support virtual packages for apt & dpkg. Issue
This seems to be a problem for the rubygems package, particularly in Debian / Ubuntu. I linked to a couple older tickets where this is reported as a minor issue with no workaround.
*UPDATE*
This issue ticket added virtual package support for apt & dpkg in 6.8.0, but it unintentionally caused the default value of the {{virtual}} parameter to change from {{ false}} to {{ true in 6}}.8.0. It also caused a regression when packages have special characters in the name (PUP-9975) The code was reverted in 6.8.1, so puppet does not currently support virtual packages for apt & dpkg. Issue PUP-10023 has been fixed to re-add virtual package support
This seems to be a problem for the rubygems package, particularly in Debian / Ubuntu. I linked to a couple older tickets where this is reported as a minor issue with no workaround.
*UPDATE*
This ticket added virtual package support for apt & dpkg in 6.8.0, but it unintentionally caused the default value of the {{virtual}} parameter to change from {{false}} to {{true}}. It also caused a regression when packages have special characters in the name (PUP-9975), and the regex was overly greedy (PUP-9974). The code was reverted in 6.8.1, so puppet does not currently support virtual packages for apt & dpkg. Issue A new ticket PUP-10023 has been fixed filed to re-add virtual package support.