Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix brokenmodules #1127

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
- 4.7.1

-------------------------------------------------------------------
Fri Sep 06 07:14:32 UTC 2024 - Ladislav Slezák <[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: 4.7.0
Version: 4.7.1
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
Loading