Skip to content

Commit

Permalink
SetUpCdromSourceTask: Allow setup source to all mountable partitions
Browse files Browse the repository at this point in the history
see also: #3594
  • Loading branch information
slayercat committed Sep 12, 2021
1 parent 1ada157 commit 7cd3e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pyanaconda/modules/payloads/source/cdrom/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ def _do_mount(self):
device_name = self._choose_installation_device(device_tree, device_candidates)

if not device_name:
raise SourceSetupError("Found no CD-ROM")
raise SourceSetupError("Found no CD-ROM source")

return device_name

def _get_device_candidate_list(self, device_tree):
stage2_device = self._probe_stage2_for_cdrom(device_tree)
device_candidates = device_tree.FindOpticalMedia()
device_candidates = device_tree.FindMountablePartitions()

if stage2_device in device_candidates:
device_candidates = [stage2_device] + device_candidates
Expand Down Expand Up @@ -97,7 +97,7 @@ def _choose_installation_device(self, device_tree, devices_candidates):
for dev_name in devices_candidates:
try:
device_data = DeviceData.from_structure(device_tree.GetDeviceData(dev_name))
mount(device_data.path, self._target_mount, "iso9660", "ro")
mount(device_data.path, self._target_mount, "auto", "ro")
except PayloadSetupError as e:
log.debug("Failed to mount %s: %s", dev_name, str(e))
continue
Expand Down
2 changes: 1 addition & 1 deletion pyanaconda/payload/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def find_optical_install_media():
"""
device_tree = STORAGE.get_proxy(DEVICE_TREE)

for dev in device_tree.FindOpticalMedia():
for dev in device_tree.FindMountablePartitions():
mountpoint = tempfile.mkdtemp()

try:
Expand Down

0 comments on commit 7cd3e41

Please sign in to comment.