This file is indexed.

/usr/lib/ruby/vendor_ruby/specinfra/command/arch/base/package.rb is in ruby-specinfra 2.35.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Specinfra::Command::Arch::Base::Package < Specinfra::Command::Linux::Base::Package
  class << self
    def check_is_installed(package,version=nil)
      if version
        grep = version.include?('-') ? "^#{escape(version)}$" : "^#{escape(version)}-"
        "pacman -Q #{escape(package)} | awk '{print $2}' | grep '#{grep}'"
      else
        "pacman -Q #{escape(package)}"
      end
    end

    def get_version(package, opts=nil)
      "pacman -Qi #{package} | grep Version | awk '{print $3}'"
    end

    def install(package, version=nil, option='')
      # Pacman doesn't support to install specific version.
      "pacman -S --noconfirm #{option} #{package}"
    end

    # Should this method be here or not ?
    def sync_repos
      "pacman -Syy"
    end

    def remove(package, option='')
      "pacman -R --noconfirm #{option} #{package}"
    end
  end
end