If liveimg --url=file:// do not delete the referenced file. Only
delete those files which are downloaded. (RHBZ 1164585)
---
pyanaconda/packaging/livepayload.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index fbdb38f..6b235ea 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -431,13 +431,20 @@ class LiveImageKSPayload(LiveImagePayload):
def postInstall(self):
""" Unmount image, remove image file from target
+ unless filr:// specified in which case just
+ umount it.
"""
super(LiveImageKSPayload, self).postInstall()
if os.path.exists(IMAGE_DIR+"/LiveOS"):
blivet.util.umount(IMAGE_DIR)
- if os.path.exists(self.image_path):
+ if self.data.method.url.startswith("file://"):
+ log.debug("live-postInstall: file://specified, just umount")
+ blivet.util.umount(self.image_path)
+
+ elif os.path.exists(self.image_path):
+ log.debug("live-postInstall: delete downloaded file")
os.unlink(self.image_path)
@property
--
1.9.3