Skip to content

Commit

Permalink
Merge pull request #131 from yast/fix_dvd
Browse files Browse the repository at this point in the history
Fix dvd
  • Loading branch information
jreidinger committed Jul 21, 2015
2 parents bbdad18 + b5448be commit 10d8472
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions package/yast2-packager.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 21 08:32:41 UTC 2015 - jreidinger@suse.com

- fix crash when adding addon on DVD (bnc#938786)
- 3.1.76

-------------------------------------------------------------------
Tue Jul 14 15:46:32 UTC 2015 - lslezak@suse.cz

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


Name: yast2-packager
Version: 3.1.75
Version: 3.1.76
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
5 changes: 4 additions & 1 deletion src/modules/SourceDialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2266,8 +2266,11 @@ def SelectStore(key, event)
@_url = "smb://"
elsif selected == :nfs
@_url = "nfs://"
# this case is specific, as it return complete path and not just
# prefix as others
elsif selected == :cd || selected == :dvd
@_url = selected == :cd ? "cd://" : "dvd://"
# use three slashes as third slash means path
@_url = selected == :cd ? "cd:///" : "dvd:///"
if @cd_device_name != ""
@_url = Ops.add(
Ops.add(@_url, "?devices="),
Expand Down
11 changes: 11 additions & 0 deletions test/source_dialogs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,15 @@
expect(subject.URLScheme("test")).to eq "url"
end
end

describe ".SelectStore" do
it "sets url to full url for DVD and CD selection" do
allow(Yast::UI).to receive(:QueryWidget).with(Id(:type), :CurrentButton)
.and_return(:dvd)

described_class.SelectStore(:type, {})

expect(described_class.instance_variable_get("@_url")).to eq "dvd:///"
end
end
end
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
end

require "yast"
require "yast/rspec"

0 comments on commit 10d8472

Please sign in to comment.