Class: ForemanMaintain::PackageManager::Base

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

Direct Known Subclasses

Apt, Dnf

Instance Method Summary collapse

Instance Method Details

#clean_cacheObject

clean the package manager cache

Raises:

  • (NotImplementedError)


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

def clean_cache
  raise NotImplementedError
end

#files_not_owned_by_package(directory) ⇒ Object

list all files not owned by installed package

Raises:

  • (NotImplementedError)


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

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)


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

def find_installed_package(name)
  raise NotImplementedError
end

#install(packages, assumeyes: false) ⇒ Object

install package

Raises:

  • (NotImplementedError)


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

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

#installed?(packages) ⇒ Boolean

are the packages installed on the system?

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def installed?(packages)
  raise NotImplementedError
end

#lock_versionsObject

prevent selected packages from update or install

Raises:

  • (NotImplementedError)


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

def lock_versions
  raise NotImplementedError
end

#modules_supported?Boolean

confirms that Package Manager supports modules

Returns:

  • (Boolean)


59
60
61
# File 'lib/foreman_maintain/package_manager/base.rb', line 59

def modules_supported?
  false
end

#remove(packages, assumeyes: false) ⇒ Object

remove package

Raises:

  • (NotImplementedError)


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

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

#unlock_versionsObject

allow all packages we previously locked to update

Raises:

  • (NotImplementedError)


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

def unlock_versions
  raise NotImplementedError
end

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

update package

Raises:

  • (NotImplementedError)


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

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

#version_locking_supported?Boolean

confirms that Package Manager supports the locking mechanism

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def version_locking_supported?
  raise NotImplementedError
end

#versions_locked?Boolean

check if packages are locked

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def versions_locked?
  raise NotImplementedError
end