diff --git a/library/general/src/modules/Mode.rb b/library/general/src/modules/Mode.rb index 60e334792..3f42c7f95 100644 --- a/library/general/src/modules/Mode.rb +++ b/library/general/src/modules/Mode.rb @@ -90,8 +90,6 @@ def main textdomain "base" - Yast.import "Package" - # Current mode @_mode = nil @@ -186,9 +184,6 @@ def SetMode(new_mode) Builtins.y2milestone("setting mode to %1", new_mode) @_mode = new_mode - # Update package manipulation mode - Package.UpdateInstallationMode - nil end diff --git a/library/packages/src/modules/Package.rb b/library/packages/src/modules/Package.rb index c72d0a98b..3a3c90958 100644 --- a/library/packages/src/modules/Package.rb +++ b/library/packages/src/modules/Package.rb @@ -116,8 +116,6 @@ def main ) } - self.UpdateInstallationMode - @last_op_canceled = false Yast.include self, "packages/common.rb" @@ -126,8 +124,8 @@ def main # If Yast is running in the autoyast configuration mode # no changes will be done on the target system by using # the PackageAI class. - def UpdateInstallationMode - @Functions = Mode.config ? @FunctionsAI : @FunctionsSystem + def functions + Mode.config ? @FunctionsAI : @FunctionsSystem end # Install list of packages @@ -136,7 +134,7 @@ def UpdateInstallationMode def DoInstall(packages) packages = deep_copy(packages) function = Convert.convert( - Ops.get(@Functions, "DoInstall"), + Ops.get(functions, "DoInstall"), :from => "any", :to => "boolean (list )" ) @@ -149,7 +147,7 @@ def DoInstall(packages) def DoRemove(packages) packages = deep_copy(packages) function = Convert.convert( - Ops.get(@Functions, "DoRemove"), + Ops.get(functions, "DoRemove"), :from => "any", :to => "boolean (list )" ) @@ -164,7 +162,7 @@ def DoInstallAndRemove(toinstall, toremove) toinstall = deep_copy(toinstall) toremove = deep_copy(toremove) function = Convert.convert( - Ops.get(@Functions, "DoInstallAndRemove"), + Ops.get(functions, "DoInstallAndRemove"), :from => "any", :to => "boolean (list , list )" ) @@ -173,7 +171,7 @@ def DoInstallAndRemove(toinstall, toremove) def Available(package) function = Convert.convert( - Ops.get(@Functions, "Available"), + Ops.get(functions, "Available"), :from => "any", :to => "boolean (string)" ) @@ -182,7 +180,7 @@ def Available(package) def Installed(package) function = Convert.convert( - Ops.get(@Functions, "Installed"), + Ops.get(functions, "Installed"), :from => "any", :to => "boolean (string)" ) @@ -191,7 +189,7 @@ def Installed(package) def PackageAvailable(package) function = Convert.convert( - Ops.get(@Functions, "PackageAvailable"), + Ops.get(functions, "PackageAvailable"), :from => "any", :to => "boolean (string)" ) @@ -200,7 +198,7 @@ def PackageAvailable(package) def PackageInstalled(package) function = Convert.convert( - Ops.get(@Functions, "PackageInstalled"), + Ops.get(functions, "PackageInstalled"), :from => "any", :to => "boolean (string)" ) @@ -210,7 +208,7 @@ def PackageInstalled(package) def InstallKernel(kernel_modules) kernel_modules = deep_copy(kernel_modules) function = Convert.convert( - Ops.get(@Functions, "InstallKernel"), + Ops.get(functions, "InstallKernel"), :from => "any", :to => "boolean (list )" ) diff --git a/package/yast2.changes b/package/yast2.changes index 00da6d89c..090840266 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 13 14:36:23 CEST 2014 - schubi@suse.de + +- Package.rb: Each call is polling which installation mode is + active currently. So Mode.rb has not to take care about modules + which are using Mode.rb. (Fixing current testcases) +- 3.1.98 + ------------------------------------------------------------------- Tue Aug 12 16:35:30 CEST 2014 - locilka@suse.com diff --git a/package/yast2.spec b/package/yast2.spec index 755ff07d2..8fd8cfdf9 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.97 +Version: 3.1.98 Release: 0 URL: https://github.com/yast/yast-yast2