Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2016-03-09 15:16:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2016-03-03 
15:09:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2016-03-09 
15:16:45.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Mar  4 10:54:48 UTC 2016 - mvid...@suse.com
+
+- Added ProductFeatures.SetOverlay,ClearOverlay for System Roles
+  (FATE#317481)
+- 3.1.177
+
+-------------------------------------------------------------------

Old:
----
  yast2-3.1.176.tar.bz2

New:
----
  yast2-3.1.177.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.h0k5et/_old  2016-03-09 15:16:46.000000000 +0100
+++ /var/tmp/diff_new_pack.h0k5et/_new  2016-03-09 15:16:46.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.176
+Version:        3.1.177
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 

++++++ yast2-3.1.176.tar.bz2 -> yast2-3.1.177.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.176/.rubocop.yml 
new/yast2-3.1.177/.rubocop.yml
--- old/yast2-3.1.176/.rubocop.yml      2016-03-02 14:26:08.000000000 +0100
+++ new/yast2-3.1.177/.rubocop.yml      2016-03-08 13:50:39.000000000 +0100
@@ -26,21 +26,11 @@
 Metrics/PerceivedComplexity:
   Max: 65
 
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-# JR: I personally think that having this variable on class level is much more 
readable
-# and easier to recognize that access visibility changed
-Style/AccessModifierIndentation:
-  EnforcedStyle: outdent
-
 Style/AccessorMethodName:
   # keep backward compatibility, but do not allow new code to be non-ruby style
   Exclude:
     - library/systemd/src/modules/systemd_target.rb
 
-# Keep non-ascii comments as it contains e.g. examples for Punycode
-Style/AsciiComments:
-  Enabled: false
-
 # UI_ID module is not camel case
 Style/ClassAndModuleCamelCase:
   Enabled: false
@@ -50,10 +40,6 @@
   Include:
     - "library/*/src/lib/**/*.rb"
 
-# keep double negation as conversion to boolean
-Style/DoubleNegation:
-  Enabled: false
-
 Style/FileName:
   Include:
     - "library/*/src/lib/**/*.rb"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.176/library/control/src/modules/ProductFeatures.rb 
new/yast2-3.1.177/library/control/src/modules/ProductFeatures.rb
--- old/yast2-3.1.176/library/control/src/modules/ProductFeatures.rb    
2016-03-02 14:26:08.000000000 +0100
+++ new/yast2-3.1.177/library/control/src/modules/ProductFeatures.rb    
2016-03-08 13:50:39.000000000 +0100
@@ -43,6 +43,9 @@
       # See defaults map below for sample contents
       @features = nil
 
+      # See SetOverlay and ClearOverlay
+      @backup_features = nil
+
       # Default values for features
       # two-level map, section_name -> [ feature -> value ]
       @defaults = {
@@ -318,6 +321,32 @@
       nil
     end
 
+    # Overlay, or override, some features.
+    # The intended use is to use SetOverlay to apply some features
+    # specified by a system role (FATE#317481).
+    # Clear would be called only when coming Back
+    # to the role selection dialog (and then SetOverlay with a different one)
+    # @param features [Hash{String => Hash{String => Object}}] in the same
+    #   format as `@features` or `@defaults`
+    # @return void
+    def SetOverlay(features)
+      @backup_features = deep_copy(@features)
+
+      features.each do |section_name, section|
+        section.each do |k, v|
+          SetFeature(section_name, k, v)
+        end
+      end
+    end
+
+    # Remove a `@features` overlay; does nothing if SetOverlay was never 
called.
+    # @see SetOverlay
+    # @return void
+    def ClearOverlay
+      return if @backup_features.nil?
+      @features = deep_copy(@backup_features)
+    end
+
     publish function: :GetStringFeature, type: "string (string, string)"
     publish function: :SetSection, type: "void (string, map <string, any>)"
     publish function: :GetSection, type: "map <string, any> (string)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.176/library/control/test/Makefile.am 
new/yast2-3.1.177/library/control/test/Makefile.am
--- old/yast2-3.1.176/library/control/test/Makefile.am  2016-03-02 
14:26:08.000000000 +0100
+++ new/yast2-3.1.177/library/control/test/Makefile.am  2016-03-08 
13:50:39.000000000 +0100
@@ -1,5 +1,6 @@
 TESTS = \
-  InstExtensionImage_test.rb
+  InstExtensionImage_test.rb \
+  ProductFeatures_test.rb
 
 TEST_EXTENSIONS = .rb
 RB_LOG_COMPILER = rspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.176/library/control/test/ProductFeatures_test.rb 
new/yast2-3.1.177/library/control/test/ProductFeatures_test.rb
--- old/yast2-3.1.176/library/control/test/ProductFeatures_test.rb      
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.177/library/control/test/ProductFeatures_test.rb      
2016-03-08 13:50:39.000000000 +0100
@@ -0,0 +1,70 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+Yast.import "ProductFeatures"
+
+describe Yast::ProductFeatures do
+  subject { Yast::ProductFeatures }
+
+  let(:original_features) do
+    {
+      "globals"      => {
+        "keyboard  " => "Hammond",
+        "flags"      => ["Uruguay", "Bhutan"]
+      },
+      "partitioning" => {
+        "open_space" => false
+      }
+    }
+  end
+
+  let(:overlay_features) do
+    {
+      "globals"  => {
+        "flags"      => ["Namibia"]
+      },
+      "software" => {
+        "packages"   => ["tangut-fonts"]
+      }
+    }
+  end
+
+  let(:resulting_features) do
+    {
+      "globals"      => {
+        "keyboard  " => "Hammond",
+        "flags"      => ["Namibia"]
+      },
+      "partitioning" => {
+        "open_space" => false
+      },
+      "software"     => {
+        "packages"   => ["tangut-fonts"]
+      }
+    }
+  end
+
+  describe ".SetOverlay" do
+    it "overrides desired values and keeps other values" do
+      subject.Import(original_features)
+      subject.SetOverlay(overlay_features)
+      expect(subject.Export).to eq(resulting_features)
+    end
+  end
+
+  describe ".ClearOverlay" do
+    it "restores the original state" do
+      subject.Import(original_features)
+      subject.SetOverlay(overlay_features)
+      subject.ClearOverlay
+      expect(subject.Export).to eq(original_features)
+    end
+
+    it "keeps the original state if nothing was overlaid" do
+      subject.Import(original_features)
+      subject.ClearOverlay
+      expect(subject.Export).to eq(original_features)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.176/package/yast2.changes 
new/yast2-3.1.177/package/yast2.changes
--- old/yast2-3.1.176/package/yast2.changes     2016-03-02 14:26:08.000000000 
+0100
+++ new/yast2-3.1.177/package/yast2.changes     2016-03-08 13:50:39.000000000 
+0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Fri Mar  4 10:54:48 UTC 2016 - mvid...@suse.com
+
+- Added ProductFeatures.SetOverlay,ClearOverlay for System Roles
+  (FATE#317481)
+- 3.1.177
+
+-------------------------------------------------------------------
 Wed Mar  2 13:10:03 UTC 2016 - jreidin...@suse.com
 
 - Require rubygems using system ruby version to avoid YaST failures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.176/package/yast2.spec 
new/yast2-3.1.177/package/yast2.spec
--- old/yast2-3.1.176/package/yast2.spec        2016-03-02 14:26:08.000000000 
+0100
+++ new/yast2-3.1.177/package/yast2.spec        2016-03-08 13:50:39.000000000 
+0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.176
+Version:        3.1.177
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 


Reply via email to