Skip to content

Commit

Permalink
Merge pull request #632 from yast/general_ay_reduce
Browse files Browse the repository at this point in the history
General ay reduce
  • Loading branch information
jreidinger committed Jun 24, 2020
2 parents 9018212 + 454d80f commit 47f9e23
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 23 20:15:14 UTC 2020 - Josef Reidinger <jreidinger@suse.com>

- Do not export general section if not requested (bsc#1172552)
- 4.3.16

-------------------------------------------------------------------
Fri Jun 19 11:38:57 UTC 2020 - Ladislav Slezák <lslezak@suse.cz>

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Expand Up @@ -22,7 +22,7 @@
%endif

Name: autoyast2
Version: 4.3.15
Version: 4.3.16
Release: 0
Summary: YaST2 - Automated Installation
License: GPL-2.0-only
Expand Down
3 changes: 2 additions & 1 deletion src/lib/autoinstall/clients/clone_system.rb
Expand Up @@ -134,7 +134,8 @@ def clone_system(options)
if options["clone"]
options["clone"].split(",")
else
Yast::ProductControl.clone_modules
# always clone general
Yast::ProductControl.clone_modules + ["general"]
end
Yast::AutoinstClone.Process
Yast::XML.YCPToXMLFile(:profile, Yast::Profile.current, filename)
Expand Down
6 changes: 4 additions & 2 deletions src/modules/AutoinstClone.rb
Expand Up @@ -125,8 +125,10 @@ def Process
log.info "Cloning #{resource} took: #{(Time.now - time_start).round} sec"
end

Call.Function("general_auto", ["Import", General()])
Call.Function("general_auto", ["SetModified"])
if @additional.include?("general")
Call.Function("general_auto", ["Import", General()])
Call.Function("general_auto", ["SetModified"])
end

Profile.Prepare
nil
Expand Down
3 changes: 2 additions & 1 deletion test/autoinst_clone_test.rb
Expand Up @@ -96,7 +96,8 @@
subject.Process
end

it "imports 'general' settings" do
it "imports 'general' settings when general is in additional modules" do
subject.additional = ["general"]
expect(Yast::Call).to receive(:Function).with("general_auto", ["Import", Hash])
expect(Yast::Call).to receive(:Function).with("general_auto", ["SetModified"])
subject.Process
Expand Down

0 comments on commit 47f9e23

Please sign in to comment.