Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2015-06-18 06:36:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2015-06-06 
09:50:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2015-06-18 
06:36:33.000000000 +0200
@@ -1,0 +2,15 @@
+Thu Jun 11 18:43:10 UTC 2015 - mfi...@suse.com
+
+- fate#318804
+  - dropped no longer used group from YaST Control Centre
+- 3.1.132
+
+-------------------------------------------------------------------
+Thu Jun 11 14:22:04 UTC 2015 - an...@suse.com
+
+- Added new method Directory.find_data_file (needed for the
+  implementation of fate#318425)
+- Deprecated Directory.datadir and Directory.ydatadir
+- 3.1.131
+
+-------------------------------------------------------------------

Old:
----
  yast2-3.1.130.tar.bz2

New:
----
  yast2-3.1.132.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.Gz5HBS/_old  2015-06-18 06:36:34.000000000 +0200
+++ /var/tmp/diff_new_pack.Gz5HBS/_new  2015-06-18 06:36:34.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.130
+Version:        3.1.132
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 

++++++ yast2-3.1.130.tar.bz2 -> yast2-3.1.132.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.130/library/desktop/groups/network_devices.desktop 
new/yast2-3.1.132/library/desktop/groups/network_devices.desktop
--- old/yast2-3.1.130/library/desktop/groups/network_devices.desktop    
2015-06-05 08:46:08.000000000 +0200
+++ new/yast2-3.1.132/library/desktop/groups/network_devices.desktop    
1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-[Desktop Entry]
-Type=Application
-Categories=Qt;X-SuSE-YaST;
-
-X-KDE-ModuleType=Library
-X-KDE-HasReadOnlyMode=true
-
-X-SuSE-YaST-Group=Network
-X-SuSE-YaST-SortKey=30
-
-OnlyShowIn=X-SuSE-YaST;
-Icon=yast-network_devices
-
-Name=Network Devices
-
-Exec=/sbin/yast2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.130/library/general/src/modules/Directory.rb 
new/yast2-3.1.132/library/general/src/modules/Directory.rb
--- old/yast2-3.1.130/library/general/src/modules/Directory.rb  2015-06-05 
08:46:08.000000000 +0200
+++ new/yast2-3.1.132/library/general/src/modules/Directory.rb  2015-06-12 
10:41:08.000000000 +0200
@@ -54,6 +54,7 @@
       @agentdir = Ops.add(@execcompdir, "/servers_non_y2")
 
       # Directory for data
+      # @deprecated since it does not honor Y2DIR. Use #find_data_file instead
       @datadir = Ops.add(@yast2dir, "/data")
       @ydatadir = @datadir
 
@@ -117,13 +118,24 @@
       nil
     end
 
+    # Find an existing file in any of the YaST data directories
+    #
+    # @param relative_path [String] name of the file to find
+    # @return [String] full path of the file if it's found, nil otherwise
+    def find_data_file(relative_path)
+      possible_paths = Yast.y2paths.map { |p| File.join(p, "data", 
relative_path) }
+      possible_paths.find { |p| File.exist?(p) }
+    end
+
     publish variable: :bindir, type: "string"
     publish variable: :ybindir, type: "string"
     publish variable: :logdir, type: "string"
     publish variable: :vardir, type: "string"
     publish variable: :etcdir, type: "string"
     publish variable: :agentdir, type: "string"
+    # @deprecated since it does not honor Y2DIR. Use #find_data_file instead
     publish variable: :datadir, type: "string"
+    # @deprecated since it's an alias for the deprecated #datadir
     publish variable: :ydatadir, type: "string"
     publish variable: :schemadir, type: "string"
     publish variable: :includedir, type: "string"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.130/library/general/test/Makefile.am 
new/yast2-3.1.132/library/general/test/Makefile.am
--- old/yast2-3.1.130/library/general/test/Makefile.am  2015-06-05 
08:46:08.000000000 +0200
+++ new/yast2-3.1.132/library/general/test/Makefile.am  2015-06-12 
10:41:09.000000000 +0200
@@ -2,6 +2,7 @@
   asciifile_test.rb \
   auto_client_test.rb \
   dialog_test.rb \
+  directory_test.rb \
   event_dispatcher_test.rb \
   finish_client_test.rb \
   hooks_test.rb \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.130/library/general/test/data/data_file.txt 
new/yast2-3.1.132/library/general/test/data/data_file.txt
--- old/yast2-3.1.130/library/general/test/data/data_file.txt   1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-3.1.132/library/general/test/data/data_file.txt   2015-06-12 
10:41:09.000000000 +0200
@@ -0,0 +1 @@
+Data file content
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.130/library/general/test/directory_test.rb 
new/yast2-3.1.132/library/general/test/directory_test.rb
--- old/yast2-3.1.130/library/general/test/directory_test.rb    1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-3.1.132/library/general/test/directory_test.rb    2015-06-12 
10:41:09.000000000 +0200
@@ -0,0 +1,27 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+Yast.import "Directory"
+
+describe Yast::Directory do
+  describe ".find_data_file" do
+    subject(:file_path) { Yast::Directory.find_data_file(file) }
+
+    context "when file does not exist" do
+      let(:file) { "does_not_exist.txt" }
+
+      it "returns nil" do
+        expect(file_path).to be_nil
+      end
+    end
+
+    context "when the file is present" do
+      let(:file) { "data_file.txt" }
+
+      it "returns the full path" do
+        expect(IO.read(file_path)).to eq "Data file content"
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.130/package/yast2.changes 
new/yast2-3.1.132/package/yast2.changes
--- old/yast2-3.1.130/package/yast2.changes     2015-06-05 08:46:08.000000000 
+0200
+++ new/yast2-3.1.132/package/yast2.changes     2015-06-12 10:41:09.000000000 
+0200
@@ -1,4 +1,19 @@
 -------------------------------------------------------------------
+Thu Jun 11 18:43:10 UTC 2015 - mfi...@suse.com
+
+- fate#318804
+  - dropped no longer used group from YaST Control Centre
+- 3.1.132
+
+-------------------------------------------------------------------
+Thu Jun 11 14:22:04 UTC 2015 - an...@suse.com
+
+- Added new method Directory.find_data_file (needed for the
+  implementation of fate#318425)
+- Deprecated Directory.datadir and Directory.ydatadir
+- 3.1.131
+
+-------------------------------------------------------------------
 Thu Jun  4 12:04:32 UTC 2015 - igonzalezs...@suse.com
 
 - Fix a typo when calling Linuxrc.value_for method
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.130/package/yast2.spec 
new/yast2-3.1.132/package/yast2.spec
--- old/yast2-3.1.130/package/yast2.spec        2015-06-05 08:46:08.000000000 
+0200
+++ new/yast2-3.1.132/package/yast2.spec        2015-06-12 10:41:09.000000000 
+0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.130
+Version:        3.1.132
 Release:        0
 URL:            https://github.com/yast/yast-yast2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.130/test/test_helper.rb 
new/yast2-3.1.132/test/test_helper.rb
--- old/yast2-3.1.130/test/test_helper.rb       2015-06-05 08:46:08.000000000 
+0200
+++ new/yast2-3.1.132/test/test_helper.rb       2015-06-12 10:41:09.000000000 
+0200
@@ -1,5 +1,11 @@
 root_location = File.expand_path("../../", __FILE__)
 inc_dirs = Dir.glob("#{root_location}/library/*/src")
+# Y2DIRs location needed for testing purpose
+ADDITIONAL_Y2DIRS = [
+  # Needed to test Y2DIR support in Yast::Directory
+  "#{root_location}/library/general/test"
+]
+inc_dirs.concat(ADDITIONAL_Y2DIRS)
 ENV["Y2DIR"] = inc_dirs.join(":")
 
 require "yast"


Reply via email to