Skip to content

Commit

Permalink
Merge a53df19 into 783913f
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed May 29, 2020
2 parents 783913f + a53df19 commit 5ff4a25
Show file tree
Hide file tree
Showing 68 changed files with 360 additions and 651 deletions.
8 changes: 4 additions & 4 deletions doc/autoyast.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ It is possible that, given a profile, AutoYaST finds issues when trying to
figure out the partitioning layout. Some of those issues might be severe
enough to stop the installation; in other cases, it just displays a warning.

The {Y2Storage::AutoinstIssues} module features a
{Y2Storage::AutoinstIssues::List} class where issues are
registered. {Y2Storage::AutoinstIssues} contains a set of possible issues -- all
of them are classes which inherit from {Y2Storage::AutoinstIssues::Issue} --.
The {Y2Storage::AutoinstIssues} module uses
Installation::AutoinstIssues::List (defined in yast2 package).
{Y2Storage::AutoinstIssues} contains a set of possible issues -- all
of them are classes which inherit from Installation::AutoinstIssues::Issue --.

[1]: https://doc.opensuse.org/projects/autoyast/#CreateProfile.General.storage "General section documentation"
[2]: https://doc.opensuse.org/projects/autoyast/#CreateProfile.Partitioning "Partitioning documentation"
Expand Down
6 changes: 6 additions & 0 deletions package/yast2-storage-ng.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 19 15:22:56 CEST 2020 - schubi@suse.de

- AutoYaST: Cleanup/improve issue handling (bsc#1171335).
- 4.3.8

-------------------------------------------------------------------
Mon May 18 15:15:02 CEST 2020 - aschnell@suse.com

Expand Down
10 changes: 5 additions & 5 deletions package/yast2-storage-ng.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-storage-ng
Version: 4.3.7
Version: 4.3.8
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
Expand All @@ -28,8 +28,8 @@ Source: %{name}-%{version}.tar.bz2
# RB_RESIZE_NOT_SUPPORTED_DUE_TO_SNAPSHOTS
BuildRequires: libstorage-ng-ruby >= 4.3.21
BuildRequires: update-desktop-files
# CWM::DynamicProgressBar
BuildRequires: yast2 >= 4.2.63
# AutoYaST issue handling
BuildRequires: yast2 >= 4.3.2
BuildRequires: yast2-devtools >= 4.2.2
# for AbortException and handle direct abort
BuildRequires: yast2-ruby-bindings >= 4.0.6
Expand All @@ -49,8 +49,8 @@ BuildRequires: rubygem(%{rb_default_ruby_abi}:parallel_tests)
Requires: findutils
# RB_RESIZE_NOT_SUPPORTED_DUE_TO_SNAPSHOTS
Requires: libstorage-ng-ruby >= 4.3.21
# CWM::DynamicProgressBar
Requires: yast2 >= 4.2.63
# AutoYaST issue handling
Requires: yast2 >= 4.3.2
# Y2Packager::Repository
Requires: yast2-packager >= 3.3.7
# for AbortException and handle direct abort
Expand Down
8 changes: 4 additions & 4 deletions src/lib/y2storage/autoinst_issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ module Y2Storage
#
# Basically, it works by registering found problems when creating the
# partitioning proposal (based on AutoYaST profile) and displaying them to
# the user. Check {Y2Storage::AutoinstIssues::Issue} in order to
# the user. Check {Y2Storage::AutoinstIssues} in order to
# find out more details about the kind of problems.
#
# About registering errors, an instance of the
# {Y2Storage::AutoinstIssues::List} will be used.
# Installation::AutoinstIssues::List (defined in yast2 package) will be used.
module AutoinstIssues
end
end

require "y2storage/autoinst_issues/list"
require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/list"
require "installation/autoinst_issues/issue"
require "y2storage/autoinst_issues/conflicting_attrs"
require "y2storage/autoinst_issues/could_not_calculate_boot"
require "y2storage/autoinst_issues/could_not_create_boot"
Expand Down
7 changes: 4 additions & 3 deletions src/lib/y2storage/autoinst_issues/conflicting_attrs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@
#
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.
require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
# Conflicting attributes where specified for the given section.
#
# The conflict is resolved and the 'selected_attr' is honored while the rest
# is ignored.
class ConflictingAttrs < Issue
class ConflictingAttrs < ::Installation::AutoinstIssues::Issue
# @return [Symbol] Selected attribute
attr_reader :selected_attr
# @return [Array<Symbol>] List of ignored attributes
attr_reader :ignored_attrs

# @param section [#parent,#section_name] Section where it was detected (see {AutoinstProfile})
# @param section [#parent,#section_name] Section where it was detected
# (see {AutoinstProfile})
# @param selected_attr [Symbol] Name of the attribute that will be used
# @param ignored_attrs [Array<Symbol>] List of attributes to be ignored
def initialize(section, selected_attr, ignored_attrs)
Expand Down
4 changes: 2 additions & 2 deletions src/lib/y2storage/autoinst_issues/could_not_calculate_boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
# It was not possible to find a way to make the system bootable
class CouldNotCalculateBoot < Issue
class CouldNotCalculateBoot < ::Installation::AutoinstIssues::Issue
def initialize(*args)
super
textdomain "storage"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/y2storage/autoinst_issues/could_not_create_boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
# It was not possible to allocate the extra partitions needed for booting
class CouldNotCreateBoot < Issue
class CouldNotCreateBoot < ::Installation::AutoinstIssues::Issue
# @param devices [Array<Planned::Devices>] see {#devices}
def initialize(devices)
textdomain "storage"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/y2storage/autoinst_issues/exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
Expand All @@ -33,7 +33,7 @@ module AutoinstIssues
# rescue SomeException => e
# new Y2Storage::AutoinstIssues::Exception.new(e)
# end
class Exception < Issue
class Exception < ::Installation::AutoinstIssues::Issue
# @return [StandardError]
attr_reader :error

Expand Down
7 changes: 4 additions & 3 deletions src/lib/y2storage/autoinst_issues/invalid_encryption.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
Expand All @@ -40,11 +40,12 @@ module AutoinstIssues
# hash = { "mount" => "/", "crypt_method" => :random_swap }
# section = AutoinstProfile::PartitionSection.new_from_hashes(hash)
# issue = InvalidEncryption.new(section, :unsuitable)
class InvalidEncryption < Issue
class InvalidEncryption < ::Installation::AutoinstIssues::Issue
# @return [Symbol] Reason which causes the encryption to be invalid
attr_reader :reason

# @param section [#parent,#section_name] Section where it was detected (see {AutoinstProfile})
# @param section [#parent,#section_name] Section where it was detected
# (see {AutoinstProfile})
# @param reason [Symbol] Reason which casues the encryption to be invalid
# (:unknown when the method is unknown; :unavailable when the method is not available,
# :unsuitable when the method is not suitable for the device)
Expand Down
7 changes: 4 additions & 3 deletions src/lib/y2storage/autoinst_issues/invalid_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
Expand All @@ -28,13 +28,14 @@ module AutoinstIssues
# problem = InvalidValue.new(section, :size)
# problem.value #=> "auto"
# problem.attr #=> :size
class InvalidValue < Issue
class InvalidValue < ::Installation::AutoinstIssues::Issue
# @return [Symbol] Name of the missing attribute
attr_reader :attr
# @return [Object] New value or :skip to skip the section.
attr_reader :new_value

# @param section [#parent,#section_name] Section where it was detected (see {AutoinstProfile})
# @param section [#parent,#section_name] Section where it was detected
# (see {AutoinstProfile})
# @param attr [Symbol] Name of the invalid attribute
# @param new_value [Integer,String,Symbol] New value or :skip to skip the section
def initialize(section, attr, new_value = :skip)
Expand Down
51 changes: 0 additions & 51 deletions src/lib/y2storage/autoinst_issues/issue.rb

This file was deleted.

83 changes: 0 additions & 83 deletions src/lib/y2storage/autoinst_issues/list.rb

This file was deleted.

7 changes: 4 additions & 3 deletions src/lib/y2storage/autoinst_issues/missing_reusable_device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
Expand All @@ -26,8 +26,9 @@ module AutoinstIssues
# @example
# section = AutoinstProfile::PartitionSection.new_from_hashes({})
# problem = MissingReusableDevice.new(section)
class MissingReusableDevice < Issue
# @param section [#parent,#section_name] Section where it was detected (see {AutoinstProfile})
class MissingReusableDevice < ::Installation::AutoinstIssues::Issue
# @param section [#parent,#section_name] Section where it was detected
# (see {AutoinstProfile})
def initialize(section)
textdomain "storage"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "y2storage/autoinst_issues/issue"
require "installation/autoinst_issues/issue"

module Y2Storage
module AutoinstIssues
Expand All @@ -26,8 +26,9 @@ module AutoinstIssues
# @example
# section = AutoinstProfile::PartitionSection.new_from_hashes({})
# problem = MissingReusableDevice.new(section)
class MissingReusableFilesystem < Issue
# @param section [#parent,#section_name] Section where it was detected (see {AutoinstProfile})
class MissingReusableFilesystem < ::Installation::AutoinstIssues::Issue
# @param section [#parent,#section_name] Section where it was detected
# (see {AutoinstProfile})
def initialize(section)
textdomain "storage"

Expand Down

0 comments on commit 5ff4a25

Please sign in to comment.