Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from imobach/fix-autoconfigure
Fix premature loading of AutoInstall
- Loading branch information
Showing
9 changed files
with
55 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module Yast | ||
# Helper methods to be used on autoinstallation. | ||
class AutoinstFunctionsClass < Module | ||
def main | ||
textdomain "installation" | ||
|
||
Yast.import "Stage" | ||
Yast.import "Mode" | ||
Yast.import "AutoinstConfig" | ||
Yast.import "ProductControl" | ||
end | ||
|
||
# Determines if the second stage should be executed | ||
# | ||
# Checks Mode, AutoinstConfig and ProductControl to decide if it's | ||
# needed. | ||
# | ||
# FIXME: It's almost equal to InstFunctions.second_stage_required? | ||
# defined in yast2-installation, but exists to avoid a circular dependency | ||
# between packages (yast2-installation -> autoyast2-installation). | ||
# | ||
# @return [Boolean] 'true' if it's needed; 'false' otherwise. | ||
def second_stage_required? | ||
return false unless Stage.initial | ||
if (Mode.autoinst || Mode.autoupgrade) && !AutoinstConfig.second_stage | ||
Builtins.y2milestone("Autoyast: second stage is disabled") | ||
false | ||
else | ||
ProductControl.RunRequired("continue", Mode.mode) | ||
end | ||
end | ||
end | ||
|
||
AutoinstFunctions = AutoinstFunctionsClass.new | ||
AutoinstFunctions.main | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters