Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2016-09-05 21:13:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-31 00:02:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2016-09-05 21:13:10.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Aug 31 14:25:19 UTC 2016 - [email protected]
+
+- Fix URLs handling when retrying to load an add-on from a CD/DVD
+  through the add_on_products.xml (related to bsc#991935).
+- 3.1.117
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.i0pT6L/_old  2016-09-05 21:13:12.000000000 +0200
+++ /var/tmp/diff_new_pack.i0pT6L/_new  2016-09-05 21:13:12.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.116
+Version:        3.1.117
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-3.1.116.tar.bz2 -> yast2-packager-3.1.117.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/.travis.yml 
new/yast2-packager-3.1.117/.travis.yml
--- old/yast2-packager-3.1.116/.travis.yml      2016-08-29 17:46:36.000000000 
+0200
+++ new/yast2-packager-3.1.117/.travis.yml      2016-09-01 10:26:57.000000000 
+0200
@@ -5,10 +5,11 @@
     # disable rvm, use system Ruby
     - rvm reset
     - wget 
https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
-    - sh ./travis_setup.sh -p "yast2-devtools yast2-testsuite yast2 
yast2-pkg-bindings yast2-country-data yast2-storage" -g rspec:3.3.0
+    - sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 
yast2-pkg-bindings yast2-country-data yast2-storage" -g "rspec:3.3.0 yast-rake 
simplecov coveralls"
 script:
     - make -f Makefile.cvs
     - make
     - sudo make install
     - make check
+    - COVERAGE=1 rake test:unit
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/README.md 
new/yast2-packager-3.1.117/README.md
--- old/yast2-packager-3.1.116/README.md        2016-08-29 17:46:36.000000000 
+0200
+++ new/yast2-packager-3.1.117/README.md        2016-09-01 10:26:57.000000000 
+0200
@@ -2,4 +2,5 @@
 
 [![Travis 
Build](https://travis-ci.org/yast/yast-packager.svg?branch=master)](https://travis-ci.org/yast/yast-packager)
 [![Jenkins 
Build](http://img.shields.io/jenkins/s/https/ci.opensuse.org/yast-packager-master.svg)](https://ci.opensuse.org/view/Yast/job/yast-packager-master/)
+[![Coverage 
Status](https://coveralls.io/repos/yast/yast-packager/badge.png)](https://coveralls.io/r/yast/yast-packager)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-3.1.116/package/yast2-packager.changes 
new/yast2-packager-3.1.117/package/yast2-packager.changes
--- old/yast2-packager-3.1.116/package/yast2-packager.changes   2016-08-29 
17:46:36.000000000 +0200
+++ new/yast2-packager-3.1.117/package/yast2-packager.changes   2016-09-01 
10:26:57.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Aug 31 14:25:19 UTC 2016 - [email protected]
+
+- Fix URLs handling when retrying to load an add-on from a CD/DVD
+  through the add_on_products.xml (related to bsc#991935).
+- 3.1.117
+
+-------------------------------------------------------------------
 Tue Aug 23 11:17:36 UTC 2016 - [email protected]
 
 - Always enable "Next" button in license confirmation dialog,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/package/yast2-packager.spec 
new/yast2-packager-3.1.117/package/yast2-packager.spec
--- old/yast2-packager-3.1.116/package/yast2-packager.spec      2016-08-29 
17:46:36.000000000 +0200
+++ new/yast2-packager-3.1.117/package/yast2-packager.spec      2016-09-01 
10:26:57.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.116
+Version:        3.1.117
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/src/modules/AddOnProduct.rb 
new/yast2-packager-3.1.117/src/modules/AddOnProduct.rb
--- old/yast2-packager-3.1.116/src/modules/AddOnProduct.rb      2016-08-29 
17:46:36.000000000 +0200
+++ new/yast2-packager-3.1.117/src/modules/AddOnProduct.rb      2016-09-01 
10:26:57.000000000 +0200
@@ -2235,7 +2235,7 @@
         end
 
         # ask for a different medium
-        current_url = AskForCD(current_url, prodname)
+        current_url = AskForCD(url, prodname)
         return nil if current_url.nil?
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/test/Makefile.am 
new/yast2-packager-3.1.117/test/Makefile.am
--- old/yast2-packager-3.1.116/test/Makefile.am 2016-08-29 17:46:36.000000000 
+0200
+++ new/yast2-packager-3.1.117/test/Makefile.am 2016-09-01 10:26:57.000000000 
+0200
@@ -1,11 +1,12 @@
 TESTS = \
   addon_product_test.rb \
   inst_url_test.rb \
-  product_patterns_test.rb \
   package_installation_test.rb \
   package_slide_show_test.rb \
   packages_test.rb \
   pkg_finish_test.rb \
+  product_license_test.rb \
+  product_patterns_test.rb \
   source_dialogs_test.rb \
   space_calculation_test.rb
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/test/addon_product_test.rb 
new/yast2-packager-3.1.117/test/addon_product_test.rb
--- old/yast2-packager-3.1.116/test/addon_product_test.rb       2016-08-29 
17:46:36.000000000 +0200
+++ new/yast2-packager-3.1.117/test/addon_product_test.rb       2016-09-01 
10:26:57.000000000 +0200
@@ -211,6 +211,7 @@
         let(:matching_product) { { "label" => repo["name"] } }
         let(:other_product) { { "label" => "other" } }
         let(:other_repo_id) { 2 }
+        let(:other_cd_url) { "cd:///?device=/dev/sr1" }
 
         context "and the product is found in the CD/DVD" do
           before do
@@ -259,6 +260,24 @@
             expect(subject.add_on_products).to_not be_empty
           end
 
+          it "does not break the URL when retrying" do
+            allow(subject).to receive(:AddRepo).with(repo["url"], 
repo["path"], repo["priority"])
+              .and_return(nil)
+            allow(subject).to receive(:AddRepo).with(other_cd_url, 
repo["path"], repo["priority"])
+              .and_return(other_repo_id)
+            allow(subject).to receive(:AddRepo).with(cd_url, repo["path"], 
repo["priority"])
+              .and_return(repo_id)
+
+            # AskForCD receives always
+            expect(subject).to receive(:AskForCD).with(repo["url"], 
repo["name"])
+              .and_return(other_cd_url, nil)
+
+            expect(Yast::Pkg).to receive(:SourceDelete).with(other_repo_id)
+            expect(subject).to_not receive(:Integrate).with(other_repo_id)
+            subject.AddPreselectedAddOnProducts(filelist)
+            expect(subject.add_on_products).to be_empty
+          end
+
           context "and check_name option is disabled" do
             let(:repo) { ADDON_REPO.merge("check_name" => true) }
             it "adds the repository" do
@@ -291,6 +310,12 @@
     context "when the repo is added successfully" do
       let(:repo_id) { 1 }
 
+      before do
+        allow(Yast::Pkg).to receive(:SourceSaveAll)
+        allow(Yast::Pkg).to receive(:SourceRefreshNow)
+        allow(Yast::Pkg).to receive(:SourceLoad)
+      end
+
       it "returns the new repository id" do
         expect(Yast::Pkg).to receive(:RepositoryAdd)
           .with("enabled" => true, "base_urls" => [url], "prod_dir" => pth, 
"priority" => prio)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/test/packages_test.rb 
new/yast2-packager-3.1.117/test/packages_test.rb
--- old/yast2-packager-3.1.116/test/packages_test.rb    2016-08-29 
17:46:37.000000000 +0200
+++ new/yast2-packager-3.1.117/test/packages_test.rb    2016-09-01 
10:26:57.000000000 +0200
@@ -33,13 +33,6 @@
   YAML.load_file(file_name)
 end
 
-def set_root_path(directory)
-  root = File.join(DATA_PATH, directory)
-  check_version = false
-  handle = Yast::WFM.SCROpen("chroot=#{root}:scr", check_version)
-  Yast::WFM.SCRSetDefault(handle)
-end
-
 PRODUCTS_FROM_ZYPP = load_zypp('products.yml').freeze
 
 describe Yast::Packages do
@@ -53,26 +46,38 @@
       allow(Yast::Product).to receive(:Product).and_return nil
     end
 
-    after(:each) do
-      # set_root_path is always called and it opens a SCR instance
-      # that needs to be closed
-      Yast::WFM.SCRClose(Yast::WFM.SCRGetDefault)
-    end
-
     context "when biosdevname behavior explicitly defined on the Kenel command 
line" do
-      it "returns biosdevname within the list of required packages" do
-        set_root_path("cmdline-biosdevname_1")
-        
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to eq(true)
+      context "when biosdevname=1" do
+        around do |example|
+          root = File.join(DATA_PATH, "cmdline-biosdevname_1")
+          change_scr_root(root, &example)
+        end
+
+        it "returns biosdevname within the list of required packages" do
+          
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to eq(true)
+        end
       end
 
-      it "does not return biosdevname within the list of required packages" do
-        set_root_path("cmdline-biosdevname_0")
-        
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to 
eq(false)
+      context "when biosdevname=0" do
+        around do |example|
+          root = File.join(DATA_PATH, "cmdline-biosdevname_0")
+          change_scr_root(root, &example)
+        end
+
+        it "does not return biosdevname within the list of required packages" 
do
+          
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to 
eq(false)
+        end
       end
 
-      it "does not return biosdevname within the list of required packages 
then value is invalid" do
-        set_root_path("cmdline-biosdevname_10")
-        
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to 
eq(false)
+      context "when biosdevname=10 (invalid)" do
+        around do |example|
+          root = File.join(DATA_PATH, "cmdline-biosdevname_10")
+          change_scr_root(root, &example)
+        end
+
+        it "does not return biosdevname within the list of required packages 
then value is invalid" do
+          
expect(Yast::Packages.kernelCmdLinePackages.include?("biosdevname")).to 
eq(false)
+        end
       end
     end
 
@@ -84,7 +89,10 @@
     end
 
     context "when biosdevname behavior not defined on the Kernel command line" 
do
-      before { set_root_path("cmdline-biosdevname_nil") }
+      around do |example|
+        root = File.join(DATA_PATH, "cmdline-biosdevname_nil")
+        change_scr_root(root, &example)
+      end
 
       context "and running on a Dell system" do
         it "returns biosdevname within the list of packages" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/test/product_license_test.rb 
new/yast2-packager-3.1.117/test/product_license_test.rb
--- old/yast2-packager-3.1.116/test/product_license_test.rb     2016-08-29 
17:46:37.000000000 +0200
+++ new/yast2-packager-3.1.117/test/product_license_test.rb     2016-09-01 
10:26:57.000000000 +0200
@@ -111,10 +111,11 @@
           # :halt case
           allow(Yast::ProductLicense).to 
receive(:TimedOKCancel).and_return(true)
 
-          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
"base_prod", "abort")).to eq(:abort)
-          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
"base_prod", "continue")).to eq(:accepted)
-          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
"base_prod", "halt")).to eq(:halt)
-          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
"base_prod", "unknown")).to eq(:abort)
+          base_prod = false
+          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
base_prod, "abort")).to eq(:abort)
+          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
base_prod, "continue")).to eq(:accepted)
+          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
base_prod, "halt")).to eq(:halt)
+          expect(Yast::ProductLicense.HandleLicenseDialogRet(licenses_ref, 
base_prod, "unknown")).to eq(:abort)
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.116/test/test_helper.rb 
new/yast2-packager-3.1.117/test/test_helper.rb
--- old/yast2-packager-3.1.116/test/test_helper.rb      2016-08-29 
17:46:37.000000000 +0200
+++ new/yast2-packager-3.1.117/test/test_helper.rb      2016-09-01 
10:26:57.000000000 +0200
@@ -2,11 +2,6 @@
 y2dirs = ENV.fetch("Y2DIR", "").split(":")
 ENV["Y2DIR"] = y2dirs.unshift(srcdir).join(":")
 
-if ENV["COVERAGE"]
-  require "simplecov"
-  SimpleCov.start
-end
-
 require "yast"
 require "yast/rspec"
 require "pathname"
@@ -18,3 +13,29 @@
   config.extend Yast::I18n  # available in context/describe
   config.include Yast::I18n # available in it/let/before/...
 end
+
+if ENV["COVERAGE"]
+  require "simplecov"
+  SimpleCov.start do
+    add_filter "/test/"
+  end
+
+  # For coverage we need to load all ruby files
+  # Note that clients/ are excluded because they run too eagerly by design
+  fs = Dir["#{srcdir}/**/*.rb"]
+  fs.delete_if { |f| f.start_with? "#{srcdir}/clients/" }
+  # HACK: this would BuildRequire yast2-slp so defer this
+  fs.delete_if { |f| f.end_with? "/SourceManagerSLP.rb" }
+  fs.each do |f|
+    require_relative f
+  end
+
+  # use coveralls for on-line code coverage reporting at Travis CI
+  if ENV["TRAVIS"]
+    require "coveralls"
+    SimpleCov.formatters = [
+      SimpleCov::Formatter::HTMLFormatter,
+      Coveralls::SimpleCov::Formatter
+    ]
+  end
+end


Reply via email to