Class: Bootloader::OsProber
- Inherits:
-
Object
- Object
- Bootloader::OsProber
- Defined in:
- src/lib/bootloader/os_prober.rb
Overview
Helper methods for the os-prober package
Class Method Summary collapse
-
.arch_supported? ⇒ Boolean
Check if os-prober is supported on this architecture.
-
.available?(bootloader) ⇒ Boolean
Check if os-prober is supported on this architecture no grub2-bls bootloader and if the package is available.
-
.package_available=(value) ⇒ Object
Sets if the os-prober package is available.
-
.package_available? ⇒ Boolean
Check if the os-prober package is available for installation.
- .package_name ⇒ Object
Class Method Details
.arch_supported? ⇒ Boolean
Check if os-prober is supported on this architecture
39 40 41 |
# File 'src/lib/bootloader/os_prober.rb', line 39 def arch_supported? !Yast::Arch.s390 end |
.available?(bootloader) ⇒ Boolean
Check if os-prober is supported on this architecture no grub2-bls bootloader and if the package is available
18 19 20 |
# File 'src/lib/bootloader/os_prober.rb', line 18 def available?(bootloader) arch_supported? && package_available? && bootloader != "grub2-bls" end |
.package_available=(value) ⇒ Object
Sets if the os-prober package is available.
It is used mainly for caching the result of the check or for testing purposes.
34 35 36 |
# File 'src/lib/bootloader/os_prober.rb', line 34 def package_available=(value) @available = value end |
.package_available? ⇒ Boolean
Check if the os-prober package is available for installation
23 24 25 26 27 |
# File 'src/lib/bootloader/os_prober.rb', line 23 def package_available? return @available unless @available.nil? Yast::Package.Available(package_name) end |
.package_name ⇒ Object
12 13 14 |
# File 'src/lib/bootloader/os_prober.rb', line 12 def package_name "os-prober" end |