Class: Yast::PackageAIClass
- Inherits:
-
Module
- Object
- Module
- Yast::PackageAIClass
- Defined in:
- library/packages/src/modules/PackageAI.rb
Instance Method Summary collapse
-
#Available(_package) ⇒ Boolean
Determines whether the package is available or not.
-
#DoInstallAndRemove(toinst, torem) ⇒ Boolean
Install and remove packages in one go.
-
#Installed(package) ⇒ Boolean
Determines whether the package is installed or not.
-
#InstallKernel(_kernel_modules) ⇒ Boolean
Installs the given kernel modules.
- #main ⇒ Object
-
#PackageAvailable(package) ⇒ Boolean
Determines whether the package with the given name is available.
-
#PackageInstalled(package) ⇒ Boolean
Determines whether the package is installed or not.
Instance Method Details
#Available(_package) ⇒ Boolean
In AutoYaST, this method always returns true.
Determines whether the package is available or not
72 73 74 |
# File 'library/packages/src/modules/PackageAI.rb', line 72 def Available(_package) true end |
#DoInstallAndRemove(toinst, torem) ⇒ Boolean
In AutoYaST, packages are added or removed from the packages proposal instead of actually installing or removing them from the system.
Install and remove packages in one go
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'library/packages/src/modules/PackageAI.rb', line 51 def DoInstallAndRemove(toinst, torem) if !toinst.empty? Yast::PackagesProposal.AddResolvables("autoyast", :package, toinst) Yast::PackagesProposal.RemoveTaboos("autoyast", :package, toinst) end if !torem.empty? Yast::PackagesProposal.AddTaboos("autoyast", :package, torem) Yast::PackagesProposal.RemoveResolvables("autoyast", :package, torem) end true end |
#Installed(package) ⇒ Boolean
In AutoYaST, this method just checks whether the package is included in the packages proposal.
Determines whether the package is installed or not
85 86 87 |
# File 'library/packages/src/modules/PackageAI.rb', line 85 def Installed(package) PackagesProposal.GetResolvables("autoyast", :package).include?(package) end |
#InstallKernel(_kernel_modules) ⇒ Boolean
The kernel packages are handled by AutoYaST on its own, so this method just does nothing and always returns true.
Installs the given kernel modules
120 121 122 |
# File 'library/packages/src/modules/PackageAI.rb', line 120 def InstallKernel(_kernel_modules) true end |
#main ⇒ Object
36 37 38 |
# File 'library/packages/src/modules/PackageAI.rb', line 36 def main textdomain "base" end |
#PackageAvailable(package) ⇒ Boolean
In AutoYaST this method is equivalent to #Available
Determines whether the package with the given name is available
108 109 110 |
# File 'library/packages/src/modules/PackageAI.rb', line 108 def PackageAvailable(package) Available(package) end |
#PackageInstalled(package) ⇒ Boolean
In AutoYaST this method is equivalent to #Installed
Determines whether the package is installed or not
97 98 99 |
# File 'library/packages/src/modules/PackageAI.rb', line 97 def PackageInstalled(package) Installed(package) end |