Skip to content

Commit

Permalink
Merge pull request #1078 from yast/fix-multi-file-config
Browse files Browse the repository at this point in the history
Makes CFA::MultiFileConfig reusable
  • Loading branch information
dgdavid committed Jul 10, 2020
2 parents 5265884 + a5537b7 commit 9a5bd4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/general/src/lib/cfa/multi_file_config.rb
Expand Up @@ -124,10 +124,10 @@ def conflicts

# Return the involved configuration files
#
# @return [Array<LoginDefs>] Configuration files
# @return [Array<Class>] Configuration files
# @see #paths
def files
@files ||= paths.map { |p| LoginDefs.new(file_path: p) }
@files ||= paths.map { |p| self.class.file_class.new(file_path: p) }
end

# Return the paths to the configuration files
Expand Down Expand Up @@ -194,14 +194,14 @@ def override_directory(path)

# Returns the YaST specific configuration file
#
# @return [LoginDefs]
# @return [Class]
def yast_config_file
@yast_config_file ||= files.find { |f| f.file_path == yast_file_path }
end

# Returns the files with higher precedence that the YaST one
#
# @return [Array<LoginDefs>] List of files
# @return [Array<Class>] List of files
def higher_precedence_files
return @higher_precedence_files if @higher_precedence_files

Expand Down
6 changes: 6 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 10 14:15:30 UTC 2020 - David Diaz <dgonzalez@suse.com>

- Make CFA::MultiFileConfig fully reusable (related to bsc#1155735,
and bsc#1157541).

-------------------------------------------------------------------
Thu Jul 9 14:35:43 UTC 2020 - Steffen Winterfeldt <snwint@suse.com>

Expand Down

0 comments on commit 9a5bd4e

Please sign in to comment.