Skip to content
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/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 20 10:50:34 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Allow skipping profile fetch errors by setting
YAST_SKIP_PROFILE_FETCH_ERROR=1 (see gh#agama-project/agama#2180).
- 5.0.5

-------------------------------------------------------------------
Thu Feb 20 14:29:46 UTC 2025 - Knut Anderssen <kanderssen@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
%endif

Name: autoyast2
Version: 5.0.4
Version: 5.0.5
Release: 0
Summary: YaST2 - Automated Installation
License: GPL-2.0-only
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ProfileLocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def Process
if !ret
# autoyast hit an error while fetching it's config file
error = _("An error occurred while fetching the profile:\n")
Report.Error(Ops.add(error, @GET_error))
Report.Error(Ops.add(error, @GET_error)) if ENV["YAST_SKIP_PROFILE_FETCH_ERROR"] != "1"
return false
end
tmp = SCR.Read(path(".target.string"), localfile)
Expand Down
24 changes: 24 additions & 0 deletions test/ProfileLocation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,30 @@
end
end

context "when the profile does not exist" do
before do
allow(subject).to receive(:Get).and_return(false)
end

it "reports an error" do
expect(Yast::Report).to receive(:Error)
expect(subject.Process).to eq(false)
end

context "and fetch errors are disabled" do
around do |example|
ENV["YAST_SKIP_PROFILE_FETCH_ERROR"] = "1"
example.run
ENV.delete("YAST_SKIP_PROFILE_FETCH_ERROR")
end

it "does not report an error" do
expect(Yast::Report).to_not receive(:Error)
expect(subject.Process).to eq(false)
end
end
end

context "when the profile is an erb file" do
let(:filepath) { "autoinst.erb" }

Expand Down