Class: Yast::PackageClass
- Inherits:
-
Module
- Object
- Module
- Yast::PackageClass
- Defined in:
- ../../src/modules/Package.rb
Instance Method Summary (collapse)
- - (Object) Available(package)
-
- (Object) DoInstall(packages)
Install list of packages.
-
- (Object) DoInstallAndRemove(toinstall, toremove)
Install and Remove list of packages in one go.
-
- (Object) DoRemove(packages)
Remove list of packages.
-
- (Object) functions
If Yast is running in the autoyast configuration mode no changes will be done on the target system by using the PackageAI class.
- - (Object) Installed(package)
- - (Object) InstallKernel(kernel_modules)
- - (Object) main
- - (Object) PackageAvailable(package)
- - (Object) PackageInstalled(package)
Instance Method Details
- (Object) Available(package)
172 173 174 175 176 177 178 179 |
# File '../../src/modules/Package.rb', line 172 def Available(package) function = Convert.convert( Ops.get(functions, "Available"), :from => "any", :to => "boolean (string)" ) function.call(package) end |
- (Object) DoInstall(packages)
Install list of packages
134 135 136 137 138 139 140 141 142 |
# File '../../src/modules/Package.rb', line 134 def DoInstall(packages) packages = deep_copy(packages) function = Convert.convert( Ops.get(functions, "DoInstall"), :from => "any", :to => "boolean (list <string>)" ) function.call(packages) end |
- (Object) DoInstallAndRemove(toinstall, toremove)
Install and Remove list of packages in one go
161 162 163 164 165 166 167 168 169 170 |
# File '../../src/modules/Package.rb', line 161 def DoInstallAndRemove(toinstall, toremove) toinstall = deep_copy(toinstall) toremove = deep_copy(toremove) function = Convert.convert( Ops.get(functions, "DoInstallAndRemove"), :from => "any", :to => "boolean (list <string>, list <string>)" ) function.call(toinstall, toremove) end |
- (Object) DoRemove(packages)
Remove list of packages
147 148 149 150 151 152 153 154 155 |
# File '../../src/modules/Package.rb', line 147 def DoRemove(packages) packages = deep_copy(packages) function = Convert.convert( Ops.get(functions, "DoRemove"), :from => "any", :to => "boolean (list <string>)" ) function.call(packages) end |
- (Object) functions
If Yast is running in the autoyast configuration mode no changes will be done on the target system by using the PackageAI class.
127 128 129 |
# File '../../src/modules/Package.rb', line 127 def functions Mode.config ? @FunctionsAI : @FunctionsSystem end |
- (Object) Installed(package)
181 182 183 184 185 186 187 188 |
# File '../../src/modules/Package.rb', line 181 def Installed(package) function = Convert.convert( Ops.get(functions, "Installed"), :from => "any", :to => "boolean (string)" ) function.call(package) end |
- (Object) InstallKernel(kernel_modules)
208 209 210 211 212 213 214 215 216 |
# File '../../src/modules/Package.rb', line 208 def InstallKernel(kernel_modules) kernel_modules = deep_copy(kernel_modules) function = Convert.convert( Ops.get(functions, "InstallKernel"), :from => "any", :to => "boolean (list <string>)" ) function.call(kernel_modules) end |
- (Object) main
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File '../../src/modules/Package.rb', line 39 def main textdomain "base" Yast.import "Mode" Yast.import "PackageAI" Yast.import "PackageSystem" #** # Packages Manipulation @FunctionsSystem = { "DoInstall" => fun_ref( PackageSystem.method(:DoInstall), "boolean (list <string>)" ), "DoRemove" => fun_ref( PackageSystem.method(:DoRemove), "boolean (list <string>)" ), "DoInstallAndRemove" => fun_ref( PackageSystem.method(:DoInstallAndRemove), "boolean (list <string>, list <string>)" ), "Available" => fun_ref( PackageSystem.method(:Available), "boolean (string)" ), "Installed" => fun_ref( PackageSystem.method(:Installed), "boolean (string)" ), "InstallKernel" => fun_ref( PackageSystem.method(:InstallKernel), "boolean (list <string>)" ), "PackageInstalled" => fun_ref( PackageSystem.method(:PackageInstalled), "boolean (string)" ), "PackageAvailable" => fun_ref( PackageSystem.method(:PackageAvailable), "boolean (string)" ) } @FunctionsAI = { "DoInstall" => fun_ref( PackageAI.method(:DoInstall), "boolean (list <string>)" ), "DoRemove" => fun_ref( PackageAI.method(:DoRemove), "boolean (list <string>)" ), "DoInstallAndRemove" => fun_ref( PackageAI.method(:DoInstallAndRemove), "boolean (list <string>, list <string>)" ), "Available" => fun_ref( PackageAI.method(:Available), "boolean (string)" ), "Installed" => fun_ref( PackageAI.method(:Installed), "boolean (string)" ), "InstallKernel" => fun_ref( PackageAI.method(:InstallKernel), "boolean (list <string>)" ), "PackageInstalled" => fun_ref( PackageAI.method(:PackageInstalled), "boolean (string)" ), "PackageAvailable" => fun_ref( PackageAI.method(:PackageAvailable), "boolean (string)" ) } @last_op_canceled = false Yast.include self, "packages/common.rb" end |
- (Object) PackageAvailable(package)
190 191 192 193 194 195 196 197 |
# File '../../src/modules/Package.rb', line 190 def PackageAvailable(package) function = Convert.convert( Ops.get(functions, "PackageAvailable"), :from => "any", :to => "boolean (string)" ) function.call(package) end |
- (Object) PackageInstalled(package)
199 200 201 202 203 204 205 206 |
# File '../../src/modules/Package.rb', line 199 def PackageInstalled(package) function = Convert.convert( Ops.get(functions, "PackageInstalled"), :from => "any", :to => "boolean (string)" ) function.call(package) end |