Skip to content

Commit

Permalink
Merge pull request #1128 from yast/merge_brokenmodules
Browse files Browse the repository at this point in the history
Merge brokenmodules
  • Loading branch information
jreidinger authored Oct 23, 2024
2 parents 41dfed1 + ed08dfb commit b7f3c57
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 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 @@
-------------------------------------------------------------------
Wed Oct 23 11:18:09 UTC 2024 - Josef Reidinger <[email protected]>

- Improve handling spaces when list of blacklisted modules are
specified (bsc#1231313)
- 5.0.15

-------------------------------------------------------------------
Wed Oct 16 19:29:19 UTC 2024 - Josef Reidinger <[email protected]>

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: 5.0.14
Version: 5.0.15
Release: 0
Summary: YaST2 - Installation Parts
License: GPL-2.0-only
Expand Down
2 changes: 1 addition & 1 deletion src/lib/installation/clients/copy_files_finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def adjust_modprobe_blacklist
end

# comma-separated list of modules
blacklisted_modules = brokenmodules.split(", ")
blacklisted_modules = brokenmodules.split(/\s*,\s*/)

# run before SCR switch
blacklist_file = ::File.join(
Expand Down
16 changes: 16 additions & 0 deletions test/copy_files_finish_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@
subject.write
end

it "handles spaces around blacklist files (bsc#1231313)" do
allow(Yast::Linuxrc).to receive(:InstallInf).with("BrokenModules")
.and_return("moduleA,moduleB , moduleC")
allow(::File).to receive(:exist?).with(blacklist_file).and_return(false)

expect(::File).to receive(:write).with(blacklist_file, String) do |_path, content|
expect(content).to_not match(/^$/) # no empty lines
expect(content).to match(/# Note: Entries added during installation\/update/)
expect(content).to match(/blacklist moduleA/)
expect(content).to match(/blacklist moduleB/)
expect(content).to match(/blacklist moduleC/)
end

subject.write
end

it "copies information about hardware status" do
expect(::FileUtils).to receive(:mkdir_p).with("/mnt/var/lib")
expect(Yast::WFM).to receive(:Execute).with(path(".local.bash"), /cp.*\/var\/lib\/hardware/)
Expand Down

0 comments on commit b7f3c57

Please sign in to comment.