Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory 
checked in at 2014-10-17 08:50:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2014-10-01 11:23:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new/yast2-packager.changes       
2014-10-17 08:50:55.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Oct 16 08:54:15 UTC 2014 - lsle...@suse.cz
+
+- fixed crash when using custom license in firstboot workflow
+  (affects SUSE Studio) (bnc#899482)
+- 3.1.52
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.Ozc3fz/_old  2014-10-17 08:50:56.000000000 +0200
+++ /var/tmp/diff_new_pack.Ozc3fz/_new  2014-10-17 08:50:56.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.51
+Version:        3.1.52
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-packager-3.1.51.tar.bz2 -> yast2-packager-3.1.52.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.51/package/yast2-packager.changes 
new/yast2-packager-3.1.52/package/yast2-packager.changes
--- old/yast2-packager-3.1.51/package/yast2-packager.changes    2014-09-29 
18:53:12.000000000 +0200
+++ new/yast2-packager-3.1.52/package/yast2-packager.changes    2014-10-16 
12:58:14.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Oct 16 08:54:15 UTC 2014 - lsle...@suse.cz
+
+- fixed crash when using custom license in firstboot workflow
+  (affects SUSE Studio) (bnc#899482)
+- 3.1.52
+
+-------------------------------------------------------------------
 Mon Sep 29 12:32:17 UTC 2014 - lsle...@suse.cz
 
 - display full URL to the currently displayed EULA (directory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.51/package/yast2-packager.spec 
new/yast2-packager-3.1.52/package/yast2-packager.spec
--- old/yast2-packager-3.1.51/package/yast2-packager.spec       2014-09-29 
18:53:12.000000000 +0200
+++ new/yast2-packager-3.1.52/package/yast2-packager.spec       2014-10-16 
12:58:14.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-packager
-Version:        3.1.51
+Version:        3.1.52
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.51/src/modules/ProductLicense.rb 
new/yast2-packager-3.1.52/src/modules/ProductLicense.rb
--- old/yast2-packager-3.1.51/src/modules/ProductLicense.rb     2014-09-29 
18:53:12.000000000 +0200
+++ new/yast2-packager-3.1.52/src/modules/ProductLicense.rb     2014-10-16 
12:58:14.000000000 +0200
@@ -18,7 +18,7 @@
 
     include Yast::Logger
 
-    DOWNLOAD_URL_SCHEMA = [URI::HTTP, URI::HTTPS, URI::FTP]
+    DOWNLOAD_URL_SCHEMA = ["http", "https", "ftp"]
 
     def main
       Yast.import "Pkg"
@@ -1555,7 +1555,8 @@
     # @param [String] location
     # @return [Boolean] true if it is a HTTP, HTTPS or an FTP URL
     def location_is_url?(location)
-      DOWNLOAD_URL_SCHEMA.include?(URI(location).class)
+      return false unless location.is_a?(::String)
+      DOWNLOAD_URL_SCHEMA.include?(URI(location).scheme)
     rescue URI::InvalidURIError => e
       log.error "Error while parsing URL #{location.inspect}: #{e.message}"
       false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-3.1.51/test/product_license_test.rb 
new/yast2-packager-3.1.52/test/product_license_test.rb
--- old/yast2-packager-3.1.51/test/product_license_test.rb      2014-09-29 
18:53:12.000000000 +0200
+++ new/yast2-packager-3.1.52/test/product_license_test.rb      2014-10-16 
12:58:14.000000000 +0200
@@ -119,5 +119,32 @@
       end
     end
 
+    describe "#location_is_url?" do
+      it "returns true for http, https and ftp URL (case insensitive)" do
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"http://example.com";)).to be_true
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"https://example.com";)).to be_true
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"ftp://example.com";)).to be_true
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"HTTP://example.com")).to be_true
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"HTTPS://example.com")).to be_true
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"FTP://example.com")).to be_true
+      end
+
+      it "returns false for other URL schema" do
+        expect(Yast::ProductLicense.send(:location_is_url?, 
"file:///foo/bar")).to be_false
+      end
+
+      it "returns false for non URL string" do
+        expect(Yast::ProductLicense.send(:location_is_url?, "/foo/bar")).to 
be_false
+      end
+
+      it "returns false for non String values" do
+        expect(Yast::ProductLicense.send(:location_is_url?, 42)).to be_false
+      end
+
+      it "returns false for nil" do
+        expect(Yast::ProductLicense.send(:location_is_url?, nil)).to be_false
+      end
+    end
+
   end
 end

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to