Sha256: c5732b34cec6d5d05a4ff6aae8209b7d26b158c9f0abbc43fe1bef0476f61943

Contents?: true

Size: 1.17 KB

Versions: 18

Compression:

Stored size: 1.17 KB

Contents

module Katello
  module Pulp
    class Rpm < PulpContentUnit
      include LazyAccessor

      PULP_SELECT_FIELDS = %w(name epoch version release arch checksumtype checksum)
      PULP_INDEXED_FIELDS = %w(name version release arch epoch summary sourcerpm checksum filename _id)
      CONTENT_TYPE = "rpm"

      lazy_accessor :pulp_facts, :initializer => :backend_data

      lazy_accessor :description, :license, :buildhost, :vendor, :relativepath, :children, :checksumtype,
                    :changelog, :group, :size, :url, :build_time, :group,
                    :initializer => :pulp_facts

      def requires
        if pulp_facts['requires']
          pulp_facts['requires'].map { |entry| Katello::Util::Package.format_requires(entry) }.uniq.sort
        else
          []
        end
      end

      def provides
        if pulp_facts['provides']
          pulp_facts['provides'].map { |entry| Katello::Util::Package.build_nvrea(entry, false) }.uniq.sort
        else
          []
        end
      end

      def files
        if pulp_facts['files']
          pulp_facts['files']['file'] + pulp_facts['files']['dir']
        else
          []
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
katello-3.0.2 app/services/katello/pulp/rpm.rb
katello-2.4.5 app/services/katello/pulp/rpm.rb
katello-3.0.1 app/services/katello/pulp/rpm.rb
katello-2.4.4 app/services/katello/pulp/rpm.rb
katello-3.0.0 app/services/katello/pulp/rpm.rb
katello-2.4.3 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc7 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc5 app/services/katello/pulp/rpm.rb
katello-2.4.2 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc4 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc3 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc2 app/services/katello/pulp/rpm.rb
katello-3.0.0.rc1 app/services/katello/pulp/rpm.rb
katello-2.4.1 app/services/katello/pulp/rpm.rb
katello-2.4.0 app/services/katello/pulp/rpm.rb
katello-2.4.0.rc3 app/services/katello/pulp/rpm.rb
katello-2.4.0.rc2 app/services/katello/pulp/rpm.rb
katello-2.4.0.rc1 app/services/katello/pulp/rpm.rb