{"record":{"id":"16513437dbd9d8c5","repo":"puppetlabs/puppet","slug":"detail","errorCode":null,"errorMessage":"detail","messagePattern":"detail","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/package/portage.rb","lineNumber":63,"sourceCode":"      end\n\n      packages = []\n      search_output.each_line do |search_result|\n        match = result_format.match(search_result)\n\n        next unless match\n\n        package = {}\n        result_fields.zip(match.captures) do |field, value|\n          package[field] = value unless !value or value.empty?\n        end\n        package[:provider] = :portage\n        packages << new(package)\n      end\n\n      packages\n    rescue Puppet::ExecutionFailure => detail\n      raise Puppet::Error, detail\n    end\n  end\n\n  def install\n    should = @resource.should(:ensure)\n    cmd = %w[]\n    name = qatom[:category] ? \"#{qatom[:category]}/#{qatom[:pn]}\" : qatom[:pn]\n    name = qatom[:pfx] + name if qatom[:pfx]\n    name = name + '-' + qatom[:pv] if qatom[:pv]\n    name = name + '-' + qatom[:pr] if qatom[:pr]\n    name = name + ':' + qatom[:slot] if qatom[:slot]\n    cmd << '--update' if [:latest].include?(should)\n    cmd += install_options if @resource[:install_options]\n    cmd << name\n    emerge(*cmd)\n  end\n\n  def uninstall","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/package/portage.rb#L45-L81","documentation":"`self.instances` (lib/puppet/provider/package/portage.rb:63) enumerates Gentoo packages by running `eix --installed` (and `eix-update` first when the eix cache is stale relative to the portage timestamp). Any Puppet::ExecutionFailure from those commands is rescued and re-raised as Puppet::Error carrying the raw detail, so the message text is whatever eix/eix-update printed.","triggerScenarios":"`/usr/bin/eix` missing because app-portage/eix is not installed ('Could not run' execution failure); `eix-update` exiting non-zero on a broken portage tree or overlay; the provider being selected on any Gentoo host during `puppet resource package` or catalog prefetch.","commonSituations":"Fresh or minimal Gentoo boxes missing app-portage/eix (the provider hard-codes /usr/bin/eix); overlays synced into a state eix-update rejects; cache files in /var/cache/eix owned by the wrong user.","solutions":["Install the tooling: `emerge app-portage/eix app-portage/portage-utils`.","Run `eix-update` manually as root and fix whatever it complains about (overlay config, permissions on /var/cache/eix).","Sync the portage tree (`emerge --sync` or eix-sync) so the timestamp/cache invariants hold.","Re-run puppet once the commands succeed by hand."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Ensure the provider's hard-coded binaries exist before the run\nfor b in /usr/bin/eix /usr/bin/eix-update /usr/bin/qatom; do [ -x \"$b\" ] || echo \"missing $b\"; done","typeGuard":null,"tryCatchPattern":"begin\n  Puppet::Type.type(:package).provider(:portage).instances\nrescue Puppet::Error => e\n  Puppet.warning(\"portage enumeration failed (eix?): #{e.message}\")\n  []\nend","preventionTips":["Include app-portage/eix and app-portage/portage-utils in Gentoo base images managed by Puppet.","Run `eix-update` successfully by hand before the first agent run.","Keep overlay configs valid so eix-update never exits non-zero."],"tags":["gentoo","portage","eix","execution-failure","package-provider"],"backgroundTag":"command-execution-failure","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}