Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2016-08-22 10:48:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-packager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-packager"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes    
2016-08-18 10:20:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2016-08-22 10:48:31.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Aug 18 10:55:06 CEST 2016 - [email protected]
+
+- Do not raise an exception if no license is available (no licence
+  dir at all) to accept (bnc#994309).
+- 3.1.115
+
+-------------------------------------------------------------------

Old:
----
  yast2-packager-3.1.114.tar.bz2

New:
----
  yast2-packager-3.1.115.tar.bz2

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.wuVOoN/_old  2016-08-22 10:48:32.000000000 +0200
+++ /var/tmp/diff_new_pack.wuVOoN/_new  2016-08-22 10:48:32.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.114
+Version:        3.1.115
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-3.1.114.tar.bz2 -> yast2-packager-3.1.115.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.114/CONTRIBUTING.md 
new/yast2-packager-3.1.115/CONTRIBUTING.md
--- old/yast2-packager-3.1.114/CONTRIBUTING.md  2016-08-16 16:51:47.000000000 
+0200
+++ new/yast2-packager-3.1.115/CONTRIBUTING.md  2016-08-19 17:01:17.000000000 
+0200
@@ -3,7 +3,7 @@
 
 YaST is an open source project and as such it welcomes all kinds of
 contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and YaST maintainers.
+ensure the process is effective and pleasant both for you and the YaST 
maintainers.
 
 There are two main forms of contribution: reporting bugs and performing code
 changes.
@@ -17,13 +17,11 @@
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
-that every bug will be fixed, but we'll try.
-
 When creating a bug report, please follow our [bug reporting
 guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
 
+We can't guarantee that every bug will be fixed, but we'll try.
+
 Code Changes
 ------------
 
@@ -44,15 +42,22 @@
      to the [Ruby style
      guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
 
-  4. Make sure your change didn't break anything by building the RPM package
+  4. Update the package version (in `packages/*.spec`, usually by
+     `rake version:bump`) and add a new entry to the `package/*.changes` file
+     (by `osc vc package`).  
+     For bigger changes or changes which need longer discussion it is advised 
to
+     add this as a separate last commit so it can be easily updated when 
another
+     change is merged in the meantime.
+
+  5. Make sure your change didn't break anything by building the RPM package
      (`rake osc:build`). The build process includes running the full testsuite.
 
-  5. Publish the branch and create a pull request.
+  6. Publish the branch and create a pull request.
 
-  6. YaST developers will review your change and possibly point out issues.
+  7. YaST developers will review your change and possibly point out issues.
      Adapt the code under their guidance until they are all resolved.
 
-  7. Finally, the pull request will get merged or rejected.
+  8. Finally, the pull request will get merged or rejected.
 
 See also [GitHub's guide on
 contributing](https://help.github.com/articles/fork-a-repo).
@@ -60,9 +65,6 @@
 If you want to do multiple unrelated changes, use separate branches and pull
 requests.
 
-Do not change the `VERSION` and `*.changes` files as this could lead to
-conflicts.
-
 ### Commits
 
 Each commit in the pull request should do only one thing, which is clearly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.114/package/yast2-packager.changes 
new/yast2-packager-3.1.115/package/yast2-packager.changes
--- old/yast2-packager-3.1.114/package/yast2-packager.changes   2016-08-16 
16:51:47.000000000 +0200
+++ new/yast2-packager-3.1.115/package/yast2-packager.changes   2016-08-19 
17:01:17.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Aug 18 10:55:06 CEST 2016 - [email protected]
+
+- Do not raise an exception if no license is available (no licence
+  dir at all) to accept (bnc#994309).
+- 3.1.115
+
+-------------------------------------------------------------------
 Tue Aug 16 14:16:01 UTC 2016 - [email protected]
 
 - Remove the icon from the add-on selection popup (bsc#875201)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.114/package/yast2-packager.spec 
new/yast2-packager-3.1.115/package/yast2-packager.spec
--- old/yast2-packager-3.1.114/package/yast2-packager.spec      2016-08-16 
16:51:47.000000000 +0200
+++ new/yast2-packager-3.1.115/package/yast2-packager.spec      2016-08-19 
17:01:17.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.114
+Version:        3.1.115
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.114/src/modules/ProductLicense.rb 
new/yast2-packager-3.1.115/src/modules/ProductLicense.rb
--- old/yast2-packager-3.1.114/src/modules/ProductLicense.rb    2016-08-16 
16:51:47.000000000 +0200
+++ new/yast2-packager-3.1.115/src/modules/ProductLicense.rb    2016-08-19 
17:01:17.000000000 +0200
@@ -325,7 +325,7 @@
     # Returns whether accepting the license manually is requied.
     #
     # @see BNC #448598
-    # @param [Any] unique ID
+    # @param [Any] id unique ID
     # @return [Boolean] if required
     def AcceptanceNeeded(id)
       # FIXME: lazy loading of the info about licenses, bigger refactoring 
needed
@@ -355,7 +355,7 @@
 
     # Sets whether explicit acceptance of a license is needed
     #
-    # @param [Any] unique ID (often a source ID)
+    # @param [Any] id unique ID (often a source ID)
     # @param [Boolean] new_value if needed
     def SetAcceptanceNeeded(id, new_value)
       if new_value == nil
@@ -840,10 +840,11 @@
 
     # Finds out whether user needs to 'Agree to the license coming from a 
given source_id'
     #
-    # @param [Any] unique ID
-    # @param [String] path to directory with unpacked licenses (mandatory)
+    # @param [Any] id unique ID
+    # @param [String,nil] license_dir path to directory with unpacked licenses
     def cache_license_acceptance_needed(id, license_dir)
-      raise "Parameter 'license_dir' must not be nil" if license_dir.nil?
+      # license_dir can be nil if there is no license present (e.g. DUDs)
+      return if license_dir.nil?
 
       license_acceptance_needed = 
!FileUtils.Exists("#{license_dir}/no-acceptance-needed")
       SetAcceptanceNeeded(id, license_acceptance_needed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.114/test/product_license_test.rb 
new/yast2-packager-3.1.115/test/product_license_test.rb
--- old/yast2-packager-3.1.114/test/product_license_test.rb     2016-08-16 
16:51:47.000000000 +0200
+++ new/yast2-packager-3.1.115/test/product_license_test.rb     2016-08-19 
17:01:17.000000000 +0200
@@ -165,45 +165,67 @@
         # Initial installation
         allow(Yast::Stage).to receive(:initial).and_return(true)
         allow(Yast::Mode).to receive(:installation).and_return(true)
-
-        # Tarball with licenses exists
-        allow(Yast::FileUtils).to 
receive(:Exists).with(/license.tar.gz/).and_return(true)
-        # Info file exists
-        allow(Yast::FileUtils).to 
receive(:Exists).with(/info.txt/).and_return(true)
       end
 
-      context "when called for base-product" do
+      context "when licenses exists" do
         before do
-          expect(Yast::ProductLicense).to 
receive(:GetSourceLicenseDirectory).and_call_original
-          expect(Yast::ProductLicense).to 
receive(:SetAcceptanceNeeded).and_call_original
-          expect(Yast::ProductLicense).to 
receive(:UnpackLicenseTgzFileToDirectory).and_return(true)
+          # Tarball with licenses exists
+          allow(Yast::FileUtils).to 
receive(:Exists).with(/license.tar.gz/).and_return(true)
+          # Info file exists
+          allow(Yast::FileUtils).to 
receive(:Exists).with(/info.txt/).and_return(true)
         end
 
-        it "returns that acceptance is needed if no-acceptance-needed file is 
not found" do
-          expect(Yast::FileUtils).to 
receive(:Exists).with(/no-acceptance-needed/).and_return(false)
-          expect(Yast::ProductLicense.AcceptanceNeeded(base_product_id)).to 
eq(true)
-        end
+        context "when called for base-product" do
+          before do
+            expect(Yast::ProductLicense).to 
receive(:GetSourceLicenseDirectory).and_call_original
+            expect(Yast::ProductLicense).to 
receive(:SetAcceptanceNeeded).and_call_original
+            expect(Yast::ProductLicense).to 
receive(:UnpackLicenseTgzFileToDirectory).and_return(true)
+          end
 
-        it "returns that acceptance is not needed if the no-acceptance-needed 
file is found" do
-          expect(Yast::FileUtils).to 
receive(:Exists).with(/no-acceptance-needed/).and_return(true)
-          expect(Yast::ProductLicense.AcceptanceNeeded(base_product_id)).to 
eq(false)
-        end
-      end
+          it "returns that acceptance is needed if no-acceptance-needed file 
is not found" do
+            expect(Yast::FileUtils).to 
receive(:Exists).with(/no-acceptance-needed/).and_return(false)
+            expect(Yast::ProductLicense.AcceptanceNeeded(base_product_id)).to 
eq(true)
+          end
 
-      context "when called for add-on product" do
-        context "when value has not been stored yet" do
-          it "returns the safe default true" do
-            
expect(Yast::ProductLicense.AcceptanceNeeded(add_on_product_id)).to eq(true)
+          it "returns that acceptance is not needed if the 
no-acceptance-needed file is found" do
+            expect(Yast::FileUtils).to 
receive(:Exists).with(/no-acceptance-needed/).and_return(true)
+            expect(Yast::ProductLicense.AcceptanceNeeded(base_product_id)).to 
eq(false)
           end
         end
 
-        context "when value has been already stored" do
-          it "returns the stored value" do
-            Yast::ProductLicense.SetAcceptanceNeeded(add_on_product_id, false)
-            
expect(Yast::ProductLicense.AcceptanceNeeded(add_on_product_id)).to eq(false)
+        context "when called for add-on product" do
+          context "when value has not been stored yet" do
+            it "returns the safe default true" do
+              
expect(Yast::ProductLicense.AcceptanceNeeded(add_on_product_id)).to eq(true)
+            end
+          end
+
+          context "when value has been already stored" do
+            it "returns the stored value" do
+              Yast::ProductLicense.SetAcceptanceNeeded(add_on_product_id, 
false)
+              
expect(Yast::ProductLicense.AcceptanceNeeded(add_on_product_id)).to eq(false)
+            end
           end
         end
       end
+
+      context "when no license exists" do
+        before do
+          # Tarball with licenses does not exist
+          allow(Yast::FileUtils).to 
receive(:Exists).with(/license.tar.gz/).and_return(false)
+          # Info file does not exist
+          allow(Yast::FileUtils).to 
receive(:Exists).with(/info.txt/).and_return(false)
+        end
+
+        it "do not blame that there is no license directory" do
+           # This call is needed for checking the 
cache_license_acceptance_needed function
+           expect(Yast::ProductLicense.AcceptanceNeeded(base_product_id)).to 
eq(true)
+           Yast::ProductLicense.SetAcceptanceNeeded(add_on_product_id, false)
+
+           expect(Yast::ProductLicense.AcceptanceNeeded(add_on_product_id)).to 
eq(false)
+        end
+
+       end
     end
 
     context "when not called in initial installation" do


Reply via email to