    # File lib/chef/provider/package/portage.rb, line 82
            def candidate_version
              return @candidate_version if @candidate_version

              status = popen4("emerge --color n --nospinner --search #{@new_resource.package_name.split('/').last}") do |pid, stdin, stdout, stderr|
                available, installed = parse_emerge(@new_resource.package_name, stdout.read)
                @candidate_version = available
              end

              unless status.exitstatus == 0
                raise Chef::Exceptions::Package, "emerge --search failed - #{status.inspect}!"
              end

              @candidate_version

            end