Sha256: 8a84aed79fa61d84efc8dfb6f039dfc789b417a98b1faf35af68336e41d3e12e

Contents?: true

Size: 691 Bytes

Versions: 10

Compression:

Stored size: 691 Bytes

Contents

class Specinfra::Command::Arch::Base::Package < Specinfra::Command::Linux::Base::Package
  class << self
    def check_is_installed(package,version=nil)
      if version
        "pacman -Q | grep #{escape(package)} #{escape(version)}"
      else
        "pacman -Q | grep #{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
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta50 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta49 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta48 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta47 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta46 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta45 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta44 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta43 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta42 lib/specinfra/command/arch/base/package.rb
specinfra-2.0.0.beta41 lib/specinfra/command/arch/base/package.rb