Sha256: 60504c8cd80f5815463b6a79722592c80a8ed3733e63b4948027fedc866bbad4
Contents?: true
Size: 909 Bytes
Versions: 152
Compression:
Stored size: 909 Bytes
Contents
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)} || pacman -Qg #{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
Version data entries
152 entries across 152 versions & 1 rubygems