Two fixes here, one set the path to INSTALL_TREE because we haven't moved anything over to ISO_DIR yet. Two account for the isys mount count for paths. When we move a mount point the isys count must be updated so that an attempt later to mount the iso into the INSTALL_TREE won't be short circuited.
One could create an (_)isys call that does the move and does the accounting, but that would add more C code, which is an anti-goal. --- pyanaconda/packaging/yumpayload.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 6b423fc..787f951 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -558,7 +558,7 @@ reposdir=%s self._setupNFS(INSTALL_TREE, method.server, method.dir, method.opts)
# check for ISO images in the newly mounted dir - path = ISO_DIR + path = INSTALL_TREE if method.dir.endswith(".iso"): # if the given URL includes a specific ISO image file, use it image_file = os.path.basename(method.dir) @@ -577,6 +577,17 @@ reposdir=%s iutil.execWithRedirect("mount", ["--move", INSTALL_TREE, ISO_DIR], stderr="/dev/tty5", stdout="/dev/tty5") + # Mounts are kept track of in isys it seems + # Remove the count for the source + if isys.mountCount.has_key(INSTALL_TREE): + if isys.mountCount[INSTALL_TREE] > 1: + isys.mountCount[INSTALL_TREE] -= 1 + else: + del(isys.mountCount[INSTALL_TREE]) + # Add a count for the new location + if not isys.mountCount.has_key(ISO_DIR): + isys.mountCount[ISO_DIR] = 0 + isys.mountCount[ISO_DIR] += 1 # mount the ISO on a loop image = os.path.normpath("%s/%s" % (ISO_DIR, image)) mountImage(image, INSTALL_TREE)
On Tue, 2012-10-30 at 16:57 -0700, Jesse Keating wrote:
Two fixes here, one set the path to INSTALL_TREE because we haven't moved anything over to ISO_DIR yet. Two account for the isys mount count for paths. When we move a mount point the isys count must be updated so that an attempt later to mount the iso into the INSTALL_TREE won't be short circuited.
One could create an (_)isys call that does the move and does the accounting, but that would add more C code, which is an anti-goal.
Not all functions in pyanaconda.isys are wrappers to _isys. So it doesn't have to add more C code and I'd rather see this as a function. The only problem I see is whether we want to import iutil from isys. Maybe it should just go to iutil.
On Tue, Oct 30, 2012 at 04:57:57PM -0700, Jesse Keating wrote:
Two fixes here, one set the path to INSTALL_TREE because we haven't moved anything over to ISO_DIR yet. Two account for the isys mount count for paths. When we move a mount point the isys count must be updated so that an attempt later to mount the iso into the INSTALL_TREE won't be short circuited.
One could create an (_)isys call that does the move and does the accounting, but that would add more C code, which is an anti-goal.
pyanaconda/packaging/yumpayload.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Ack
anaconda-patches@lists.fedorahosted.org