Skip to content

Commit

Permalink
Merge 6353853 into 2bd8630
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed May 5, 2023
2 parents 2bd8630 + 6353853 commit 21f0ed6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions package/yast2-storage-ng.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri May 5 10:50:07 UTC 2023 - José Iván López González <jlopez@suse.com>

- Allow to pass commit callbacks to inst_prepdisk client.
- Needed for Agama (gh#openSUSE/agama/558).
- 4.6.8

-------------------------------------------------------------------
Wed May 3 11:51:09 UTC 2023 - Ancor Gonzalez Sosa <ancor@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion 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.6.7
Version: 4.6.8
Release: 0
Summary: YaST2 - Storage Configuration
License: GPL-2.0-only OR GPL-3.0-only
Expand Down
15 changes: 12 additions & 3 deletions src/lib/y2storage/clients/inst_prepdisk.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) [2015-2016] SUSE LLC
# Copyright (c) [2015-2023] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -38,8 +38,12 @@ class InstPrepdisk

EFIVARS_PATH = "/sys/firmware/efi/efivars".freeze

def initialize
# Constructor
#
# @param commit_callbacks [Storage::CommitCallbacks, nil]
def initialize(commit_callbacks: nil)
textdomain "storage"
@commit_callbacks = commit_callbacks
end

def run
Expand All @@ -58,13 +62,18 @@ def run

protected

# Callbacks to use for commit
#
# @return [Storage::CommitCallbacks, nil]
attr_reader :commit_callbacks

# Commits the actions to disk
#
# @return [Boolean] true if everything went fine, false if the user
# decided to abort
def commit
manager.rootprefix = Yast::Installation.destdir
return false unless manager.commit(force_rw: true)
return false unless manager.commit(force_rw: true, callbacks: commit_callbacks)

mount_in_target("/dev", "devtmpfs", "-t devtmpfs")
mount_in_target("/proc", "proc", "-t proc")
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2storage/storage_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def committed?
# The user is asked whether to continue on each error reported by libstorage-ng.
#
# @param force_rw [Boolean] if mount points should be forced to have read/write permissions.
# @param callbacks [Y2Storage::Callbacks::Commit]
# @param callbacks [Storage::CommitCallbacks]
#
# @return [Boolean] whether commit was successful, false if libstorage-ng found a problem and it was
# decided to abort.
Expand Down

0 comments on commit 21f0ed6

Please sign in to comment.