forked from QubesOS/qubes-anaconda
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From ec08fd61f9805780e97a4ec6cc324cb50274e082 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
<[email protected]> | ||
Date: Sat, 31 Jul 2021 03:36:02 +0200 | ||
Subject: [PATCH] Resolve filename into associated loop device | ||
|
||
This fixes checking if given (disk image) file is mounted somewhere, | ||
especially as /run/initramfs/repo. | ||
PackagePayload._device_is_mounted_as_source() depends on it. | ||
|
||
QubesOS/qubes-issues#6792 | ||
--- | ||
pyanaconda/payload/utils.py | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/pyanaconda/payload/utils.py b/pyanaconda/payload/utils.py | ||
index e0c7d6cc5..42038e37c 100644 | ||
--- a/pyanaconda/payload/utils.py | ||
+++ b/pyanaconda/payload/utils.py | ||
@@ -52,6 +52,9 @@ def get_device_path(device_name): | ||
|
||
device_tree = STORAGE.get_proxy(DEVICE_TREE) | ||
device_data = DeviceData.from_structure(device_tree.GetDeviceData(device_name)) | ||
+ if device_data.type == 'file' and device_data.children: | ||
+ # resolve file path to associated loop device, if any | ||
+ device_data = DeviceData.from_structure(device_tree.GetDeviceData(device_data.children[0])) | ||
return device_data.path | ||
|
||
|
||
-- | ||
2.31.1 | ||
|
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