puppetlabs/puppet · error · Puppet::Error
More than one package with the specified name [%{search_valu
Error message
More than one package with the specified name [%{search_value}], please use the category parameter to disambiguate What it means
Raised in `query` (lib/puppet/provider/package/portage.rb:229) when a bare package name (no category) matches more than one package across categories/overlays in the eix results. The provider refuses to guess and raises Puppet::Error telling you to disambiguate with the category parameter.
Source
Thrown at lib/puppet/provider/package/portage.rb:229
if search
package[:version_available] = eix_get_version_for_versions(package[:installable_versions], search)
package[:ensure] = eix_get_version_for_versions(package[:installed_versions], search)
elsif qatom[:slot]
package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], qatom[:slot])
package[:ensure] = eix_get_version_for_slot(package[:installed_slots], qatom[:slot])
end
package[:ensure] = package[:ensure] || :absent
packages << package
end
case packages.size
when 0
raise Puppet::Error, _("No package found with the specified name [%{name}]") % { name: @resource[:name] }
when 1
@eix_result = packages[0]
else
raise Puppet::Error, _("More than one package with the specified name [%{search_value}], please use the category parameter to disambiguate") % { search_value: search_value }
end
rescue Puppet::ExecutionFailure => detail
raise Puppet::Error, detail
end
end
def latest
query[:version_available]
end
private
def eix_get_version_for_versions(versions, target)
# [2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] 3.5.2
return nil if versions.nil?
versions = versions.split(',')
# [2.7.10-r1 2.7.12 3.4.3-r1 3.4.5 3.5.2]View on GitHub (pinned to e227c27540)
Solutions
- Use the fully qualified `category/name` form in the resource title: `dev-libs/openssl`.
- Run `eix --exact <name>` to list the colliding categories and pick the right one.
- Prune redundant overlays if the duplication is unintended.
Example fix
# before
package { 'openssl':
ensure => installed,
provider => portage,
}
# after
package { 'dev-libs/openssl':
ensure => installed,
provider => portage,
} Defensive patterns
Strategy: validation
Validate before calling
# Disambiguate up front: require a category when the bare name collides
[ "$(eix --exact --only-name "${name}" | wc -l)" -gt 1 ] && echo "use category/name form" || echo OK Prevention
- Always use `category/name` (e.g. dev-libs/openssl) in portage resources.
- Audit overlays for duplicate copies of system packages.
- Automate the eix collision check in profile tests.
When it happens
Trigger: `package { 'openssl': provider => portage }` on a system where the name exists as dev-libs/openssl and also via another overlay's category; any duplicated port name across overlays.
Common situations: Common tool names (openssl, zlib) duplicated by overlays like gentoo vs local categories; overlays that re-add system packages.
Related errors
- detail
- No package found with the specified name [%{name}]
- Could not disable #{name}: #{output}
- Could not enable #{name}: #{output}
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/b030707c95586ad3.
Report an issue: GitHub.