Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2014-01-31 11:50:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2014-01-24 
21:42:49.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2014-01-31 
11:50:48.000000000 +0100
@@ -1,0 +2,8 @@
+Thu Jan 30 09:27:43 UTC 2014 - [email protected]
+
+- bnc#861078
+  - detected network service set properly when running in
+    installation mode
+- 3.1.17
+
+-------------------------------------------------------------------

Old:
----
  yast2-3.1.16.tar.bz2

New:
----
  yast2-3.1.17.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.x7U0Jk/_old  2014-01-31 11:50:49.000000000 +0100
+++ /var/tmp/diff_new_pack.x7U0Jk/_new  2014-01-31 11:50:49.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.16
+Version:        3.1.17
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-3.1.16.tar.bz2 -> yast2-3.1.17.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.16/library/general/test/Makefile.am 
new/yast2-3.1.17/library/general/test/Makefile.am
--- old/yast2-3.1.16/library/general/test/Makefile.am   2014-01-22 
12:26:53.000000000 +0100
+++ new/yast2-3.1.17/library/general/test/Makefile.am   2014-01-30 
16:11:59.000000000 +0100
@@ -1,5 +1,6 @@
 TESTS = \
-  linuxrc_test.rb
+  linuxrc_test.rb \
+       hooks_test.rb
 
 TEST_EXTENSIONS = .rb
 RB_LOG_COMPILER = rspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.16/library/general/test/hooks_test.rb 
new/yast2-3.1.17/library/general/test/hooks_test.rb
--- old/yast2-3.1.16/library/general/test/hooks_test.rb 2014-01-22 
12:26:53.000000000 +0100
+++ new/yast2-3.1.17/library/general/test/hooks_test.rb 2014-01-30 
16:11:59.000000000 +0100
@@ -56,14 +56,14 @@
     it "tracks the results of the run hook files" do
       hook = Hooks.run 'before_hook'
       expect(Hooks.last.results.size).to eq(2)
-      failed_hook_file = Hooks.find('before_hook').results.first
-      expect(failed_hook_file.exit).not_to eq(0)
-      expect(failed_hook_file.stderr).to match(/failure/)
+      failed_hook_file = Hooks.find('before_hook').files.first
+      expect(failed_hook_file.result.exit).not_to eq(0)
+      expect(failed_hook_file.result.stderr).to match(/failure/)
       expect(failed_hook_file.output).to match(/failure/)
 
-      succeeded_hook_file = Hooks.find('before_hook').results.last
-      expect(succeeded_hook_file.exit).to eq(0)
-      expect(succeeded_hook_file.stdout).to match(/success/)
+      succeeded_hook_file = Hooks.find('before_hook').files.last
+      expect(succeeded_hook_file.result.exit).to eq(0)
+      expect(succeeded_hook_file.result.stdout).to match(/success/)
       expect(succeeded_hook_file.output).to match(/success/)
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.16/library/network/src/modules/NetworkService.rb 
new/yast2-3.1.17/library/network/src/modules/NetworkService.rb
--- old/yast2-3.1.16/library/network/src/modules/NetworkService.rb      
2014-01-22 12:26:53.000000000 +0100
+++ new/yast2-3.1.17/library/network/src/modules/NetworkService.rb      
2014-01-30 16:11:59.000000000 +0100
@@ -130,19 +130,19 @@
     # @return true  when the network is managed by an external tool, 
     #               like NetworkManager, false otherwise
     def network_manager?
-      cached_name == :network_manager
+      cached_service?(:network_manager)
     end
 
     alias_method :is_network_manager, :network_manager?
 
     def netconfig?
-      cached_name == :netconfig
+      cached_service?(:netconfig)
     end
 
     alias_method :is_netconfig, :netconfig?
 
     def wicked?
-      cached_name == :wicked
+      cached_service?(:wicked)
     end
 
     alias_method :is_wicked, :wicked?
@@ -178,8 +178,16 @@
             @current_name = :network_manager
           when "wicked"
             @current_name = :wicked
+          else
+            if Mode.installation || Mode.config
+              Builtins.y2milestone("Running in installer, use default: wicked")
+              @current_name = :wicked
+            else
+              Builtins.y2error("Cannot determine used network service.")
+              raise "Cannot detect used network service"
+            end
         end
-  
+
         @cached_name = @current_name
 
         Builtins.y2milestone("Current backend: #{@current_name}")
@@ -354,6 +362,8 @@
       end
     end
 
+    private
+
     # Replies with currently selected network service name
     #
     # Currently known backends:
@@ -362,12 +372,19 @@
     # - :wicked - supported (via its backward compatibility to
     # ifup)
     #
-    private
     def cached_name
       Read()
       return @cached_name
     end
 
+    # Checks if currently cached service is the given one
+    def cached_service?( service)
+      cached_name == service
+    rescue
+      Builtins.y2error("NetworkService: error when checking cached network 
service")
+      false
+    end
+
     # Restarts wicked backend directly
     def wicked_restart
       run_wicked( "ifdown", "all")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.16/library/network/test/network_service_test.rb 
new/yast2-3.1.17/library/network/test/network_service_test.rb
--- old/yast2-3.1.16/library/network/test/network_service_test.rb       
2014-01-22 12:26:53.000000000 +0100
+++ new/yast2-3.1.17/library/network/test/network_service_test.rb       
2014-01-30 16:11:59.000000000 +0100
@@ -12,7 +12,19 @@
   context "smoke test" do
     describe "#is_network_manager" do
       it "does not crash" do
-        expect([true, false].include? 
Yast::NetworkService.is_network_manager).to be_true
+        expect{ Yast::NetworkService.is_network_manager }.not_to raise_error
+      end
+    end
+
+    describe "#is_wicked" do
+      it "does not crash" do
+        expect{ Yast::NetworkService.is_wicked }.not_to raise_error
+      end
+    end
+
+    describe "#is_netconfig" do
+      it "does not crash" do
+        expect{ Yast::NetworkService.is_netconfig }.not_to raise_error
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.16/package/yast2.changes 
new/yast2-3.1.17/package/yast2.changes
--- old/yast2-3.1.16/package/yast2.changes      2014-01-22 12:26:53.000000000 
+0100
+++ new/yast2-3.1.17/package/yast2.changes      2014-01-30 16:11:59.000000000 
+0100
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Thu Jan 30 09:27:43 UTC 2014 - [email protected]
+
+- bnc#861078
+  - detected network service set properly when running in
+    installation mode
+- 3.1.17
+
+-------------------------------------------------------------------
 Tue Jan 21 14:57:14 UTC 2014 - [email protected]
 
 - remove from wizard icons for title as proposed by Ken
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.16/package/yast2.spec 
new/yast2-3.1.17/package/yast2.spec
--- old/yast2-3.1.16/package/yast2.spec 2014-01-22 12:26:53.000000000 +0100
+++ new/yast2-3.1.17/package/yast2.spec 2014-01-30 16:11:59.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.16
+Version:        3.1.17
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to