Class: Yast::PackageAIClass
- Inherits:
-
Module
- Object
- Module
- Yast::PackageAIClass
- Defined in:
- ../../src/modules/PackageAI.rb
Instance Method Summary (collapse)
- - (Object) Available(package)
- - (Object) DoInstall(packages)
- - (Object) DoInstallAndRemove(toinst, torem)
- - (Object) DoRemove(packages)
-
- (Boolean) GetModified
Functions which returns if the settings were modified.
- - (Object) Installed(package)
- - (Object) InstallKernel(kernel_modules)
- - (Object) main
-
- (Object) PackageAvailable(package)
Is a package available? Checks only package name, not list of provides.
-
- (Object) PackageInstalled(package)
Is a package installed? Checks only the package name in contrast to Installed() function.
-
- (Object) SetModified
Function sets internal variable, which indicates, that any settings were modified, to “true”.
Instance Method Details
- (Object) Available(package)
101 102 103 |
# File '../../src/modules/PackageAI.rb', line 101 def Available(package) true end |
- (Object) DoInstall(packages)
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File '../../src/modules/PackageAI.rb', line 64 def DoInstall(packages) packages = deep_copy(packages) @toinstall = Convert.convert( Builtins.union(@toinstall, packages), :from => "list", :to => "list <string>" ) @toremove = Builtins.filter(@toremove) do |p| !Builtins.contains(packages, p) end @modified = true true end |
- (Object) DoInstallAndRemove(toinst, torem)
92 93 94 95 96 97 98 99 |
# File '../../src/modules/PackageAI.rb', line 92 def DoInstallAndRemove(toinst, torem) toinst = deep_copy(toinst) torem = deep_copy(torem) DoInstall(toinst) DoRemove(torem) @modified = true true end |
- (Object) DoRemove(packages)
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File '../../src/modules/PackageAI.rb', line 78 def DoRemove(packages) packages = deep_copy(packages) @toremove = Convert.convert( Builtins.union(@toremove, packages), :from => "list", :to => "list <string>" ) @toinstall = Builtins.filter(@toinstall) do |p| !Builtins.contains(packages, p) end @modified = true true end |
- (Boolean) GetModified
Functions which returns if the settings were modified
60 61 62 |
# File '../../src/modules/PackageAI.rb', line 60 def GetModified @modified end |
- (Object) Installed(package)
105 106 107 |
# File '../../src/modules/PackageAI.rb', line 105 def Installed(package) Builtins.contains(@toinstall, package) end |
- (Object) InstallKernel(kernel_modules)
122 123 124 125 126 127 128 129 |
# File '../../src/modules/PackageAI.rb', line 122 def InstallKernel(kernel_modules) kernel_modules = deep_copy(kernel_modules) # TODO: for 9.2, we always install all packages, but # we could only install those really needed (#44394) # the kernel packages are handled by autoyast on its own true end |
- (Object) main
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File '../../src/modules/PackageAI.rb', line 36 def main textdomain "base" @toinstall = [] @toremove = [] @last_op_canceled = false Yast.include self, "packages/common.rb" # default value of settings modified @modified = false end |
- (Object) PackageAvailable(package)
Is a package available? Checks only package name, not list of provides.
117 118 119 |
# File '../../src/modules/PackageAI.rb', line 117 def PackageAvailable(package) Available(package) end |
- (Object) PackageInstalled(package)
Is a package installed? Checks only the package name in contrast to Installed() function.
111 112 113 |
# File '../../src/modules/PackageAI.rb', line 111 def PackageInstalled(package) Installed(package) end |
- (Object) SetModified
Function sets internal variable, which indicates, that any settings were modified, to “true”
52 53 54 55 56 |
# File '../../src/modules/PackageAI.rb', line 52 def SetModified @modified = true nil end |