From 5be52e7c3122634a1d7b011922356788315e22ec Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sun, 25 Apr 2021 22:27:18 +0800
Subject: [PATCH] patch

---
 pyanaconda/core/constants.py                                | 1 +
 pyanaconda/modules/payloads/source/cdrom/initialization.py  | 3 ++-
 pyanaconda/modules/payloads/source/utils.py                 | 4 ++--
 tests/nosetests/pyanaconda_tests/module_source_base_test.py | 3 +--
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index 4fc4b80..4724dc1 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -53,6 +53,7 @@ DRACUT_ISODIR = "/run/install/source"
 ISO_DIR = MOUNT_DIR + "/isodir"
 IMAGE_DIR = MOUNT_DIR + "/image"
 INSTALL_TREE = MOUNT_DIR + "/source"
+SOURCES_DIR = MOUNT_DIR + "/sources"
 BASE_REPO_NAME = "anaconda"
 
 # Get list of repo names witch should be used as base repo
diff --git a/pyanaconda/modules/payloads/source/cdrom/initialization.py b/pyanaconda/modules/payloads/source/cdrom/initialization.py
index 7fc38fc..95303ea 100644
--- a/pyanaconda/modules/payloads/source/cdrom/initialization.py
+++ b/pyanaconda/modules/payloads/source/cdrom/initialization.py
@@ -98,7 +98,8 @@ class SetUpCdromSourceTask(SetUpMountTask):
             try:
                 device_data = DeviceData.from_structure(device_tree.GetDeviceData(dev_name))
                 mount(device_data.path, self._target_mount, "iso9660", "ro")
-            except PayloadSetupError:
+            except PayloadSetupError as e:
+                log.debug("Failed to mount %s: %s", dev_name, str(e))
                 continue
 
             if is_valid_install_disk(self._target_mount):
diff --git a/pyanaconda/modules/payloads/source/utils.py b/pyanaconda/modules/payloads/source/utils.py
index a8e2f49..2dc4062 100644
--- a/pyanaconda/modules/payloads/source/utils.py
+++ b/pyanaconda/modules/payloads/source/utils.py
@@ -20,7 +20,7 @@ import os.path
 from blivet.arch import get_arch
 from blivet.util import mount
 
-from pyanaconda.core.constants import INSTALL_TREE
+from pyanaconda.core.constants import SOURCES_DIR
 from pyanaconda.core.storage import device_matches
 from pyanaconda.core.util import join_paths
 from pyanaconda.payload.image import find_first_iso_image
@@ -177,7 +177,7 @@ class MountPointGenerator:
         :rtype: str
         """
         path = "{}/mount-{:0>4}-{}".format(
-            INSTALL_TREE,
+            SOURCES_DIR,
             cls._counter,
             suffix
         )
diff --git a/tests/nosetests/pyanaconda_tests/module_source_base_test.py b/tests/nosetests/pyanaconda_tests/module_source_base_test.py
index c9f00fa..2d1a1da 100644
--- a/tests/nosetests/pyanaconda_tests/module_source_base_test.py
+++ b/tests/nosetests/pyanaconda_tests/module_source_base_test.py
@@ -20,7 +20,6 @@ from pathlib import Path
 from tempfile import TemporaryDirectory
 from unittest.mock import patch
 
-from pyanaconda.core.constants import INSTALL_TREE
 from pyanaconda.modules.common.errors.payload import SourceSetupError, SourceTearDownError
 from pyanaconda.modules.payloads.constants import SourceType
 from pyanaconda.modules.payloads.source.mount_tasks import SetUpMountTask, TearDownMountTask
@@ -55,7 +54,7 @@ class MountingSourceMixinTestCase(unittest.TestCase):
     def counter_test(self):
         """Mount path in mount source base gets incremental numbers."""
         module = DummyMountingSourceSubclass()
-        self.assertTrue(module.mount_point.startswith(INSTALL_TREE + "/mount-"))
+        self.assertTrue(module.mount_point.startswith("/run/install/sources/mount-"))
         first_counter = int(module.mount_point.split("-")[1])
 
         module = DummyMountingSourceSubclass()
-- 
2.27.0

