Skip to content

Commit

Permalink
Fix iso-scan support
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Jul 31, 2021
1 parent 0d85bcf commit b0ff918
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions 0035-Resolve-filename-into-associated-loop-device.patch
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

1 change: 1 addition & 0 deletions anaconda.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Patch30: 0031-Compute-template-RPMs-needed-spaces.patch
Patch31: 0032-dnfpayload-make-available-repos-for-post-scripts.patch
Patch32: 0033-Set-human-names-for-Qubes-thin-pools.patch
Patch33: 0034-Fix-standard-partitioning-set-xfs-as-default-fs-ther.patch
Patch34: 0035-Resolve-filename-into-associated-loop-device.patch

# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
Expand Down

0 comments on commit b0ff918

Please sign in to comment.