Skip to content

Commit

Permalink
Merge pull request #754 from yast/extra_urls_with_variable
Browse files Browse the repository at this point in the history
Extra urls with variable
  • Loading branch information
jreidinger committed Nov 1, 2018
2 parents 1773b7a + 38b25eb commit 37ece90
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Nov 1 08:03:27 UTC 2018 - jreidinger@suse.com

- extra_urls: compare unexpanded urls, so two identical
repositories with variables are detected (bsc#1090193)
- 4.1.24

-------------------------------------------------------------------
Mon Oct 29 13:02:11 CET 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.1.23
Version: 4.1.24
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installation/clients/inst_extrasources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def RegisteredUrls

result = srcs.each_with_object([]) do |src, ret|
general = Pkg.SourceGeneralData(src)
url = general["url"]
url = general["raw_url"]
next if url.nil? || url.empty?
@local_urls[src] = url if Mode.update && url =~ /^dir:\/+mnt\/+/
# check for USB sources which should be disabled
Expand Down
6 changes: 3 additions & 3 deletions test/inst_extrasources_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
subject.instance_variable_set(:"@usb_sources", {})

allow(Yast::Pkg).to receive(:SourceGetCurrent).with(false).and_return([0, 1, 2, 3])
allow(Yast::Pkg).to receive(:SourceGeneralData).with(0).and_return("url" => "http://test.com/")
allow(Yast::Pkg).to receive(:SourceGeneralData).with(0).and_return("raw_url" => "http://test.com/")
allow(Yast::Pkg).to receive(:SourceGeneralData).with(1)
.and_return("url" => "usb://device=/dev/disk/by-id/usb-15")
allow(Yast::Pkg).to receive(:SourceGeneralData).with(2).and_return("url" => "dir:///mnt/path")
.and_return("raw_url" => "usb://device=/dev/disk/by-id/usb-15")
allow(Yast::Pkg).to receive(:SourceGeneralData).with(2).and_return("raw_url" => "dir:///mnt/path")
allow(Yast::Pkg).to receive(:SourceGeneralData).with(3).and_return({})
end

Expand Down

0 comments on commit 37ece90

Please sign in to comment.