Class: ForemanMaintain::PackageManager::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/foreman_maintain/package_manager/base.rb

Overview

rubocop:disable Lint/UnusedMethodArgument

Direct Known Subclasses

Apt, Yum

Instance Method Summary collapse

Instance Method Details

#clean_cacheObject

clean the package manager cache

Raises:

  • (NotImplementedError)


50
51
52
# File 'lib/foreman_maintain/package_manager/base.rb', line 50

def clean_cache
  raise NotImplementedError
end

#files_not_owned_by_package(directory) ⇒ Object

list all files not owned by installed package

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/foreman_maintain/package_manager/base.rb', line 55

def files_not_owned_by_package(directory)
  raise NotImplementedError
end

#find_installed_package(name) ⇒ Object

find installed package and return full nvra or nil

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/foreman_maintain/package_manager/base.rb', line 15

def find_installed_package(name)
  raise NotImplementedError
end

#install(packages, assumeyes: false) ⇒ Object

install package

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/foreman_maintain/package_manager/base.rb', line 20

def install(packages, assumeyes: false)
  raise NotImplementedError
end

#installed?(packages) ⇒ Boolean

are the packages installed on the system?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/foreman_maintain/package_manager/base.rb', line 10

def installed?(packages)
  raise NotImplementedError
end

#lock_versionsObject

prevent selected packages from update or install

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/foreman_maintain/package_manager/base.rb', line 35

def lock_versions
  raise NotImplementedError
end

#remove(packages, assumeyes: false) ⇒ Object

remove package

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/foreman_maintain/package_manager/base.rb', line 25

def remove(packages, assumeyes: false)
  raise NotImplementedError
end

#unlock_versionsObject

allow all packages we previously locked to update

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/foreman_maintain/package_manager/base.rb', line 40

def unlock_versions
  raise NotImplementedError
end

#update(packages = [], assumeyes: false) ⇒ Object

update package

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/foreman_maintain/package_manager/base.rb', line 30

def update(packages = [], assumeyes: false)
  raise NotImplementedError
end

#version_locking_supported?Boolean

confirms that Package Manager supports the locking mechanism

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/foreman_maintain/package_manager/base.rb', line 5

def version_locking_supported?
  raise NotImplementedError
end

#versions_locked?Boolean

check if packages are locked

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/foreman_maintain/package_manager/base.rb', line 45

def versions_locked?
  raise NotImplementedError
end