Skip to content

Commit

Permalink
Do not process the add-on section during the 2nd stage
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 18, 2021
1 parent af0f99d commit b1cd43c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/autoinstall/clients/inst_autosetup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def main
log.warn("User has aborted the installation.")
return :abort
end
Profile.remove_sections("add-on")

Call.Function("add-on_auto", ["Write"])

# Recover partitioning settings that were removed by the add-on_auto client (bsc#1073548)
Expand Down
21 changes: 21 additions & 0 deletions test/lib/clients/inst_autosetup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,26 @@
end
end
end

context "when the add-on section is included" do
let(:profile) do
{
"add-on" => {
"add_on_products" => [
{ "media_url" => "relurl:///", "product_dir" => "/AddOn" }
]
}
}
end

it "removes the add-on section from the profile" do
expect(Yast::Profile.current).to have_key("add-on")
expect(Yast::WFM).to receive(:CallFunction)
.with("add-on_auto", ["Import", profile["add-on"]])
.and_return(true)
subject.main
expect(Yast::Profile.current).to_not have_key("add-on")
end
end
end
end

0 comments on commit b1cd43c

Please sign in to comment.