summaryrefslogtreecommitdiffstats
path: root/pyanaconda/packaging
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2012-08-28 11:00:41 -0400
committerChris Lumens <clumens@redhat.com>2012-08-28 15:50:29 -0400
commit7434d1c6bf0518903600847976ca0f017d3026be (patch)
treebeda7ca6251f7d7de0e15f472a80d70678512640 /pyanaconda/packaging
parenta372ffd2645bc1930864b8a4bce7e888729fc66d (diff)
downloadanaconda-7434d1c6bf0518903600847976ca0f017d3026be.tar.gz
anaconda-7434d1c6bf0518903600847976ca0f017d3026be.tar.xz
anaconda-7434d1c6bf0518903600847976ca0f017d3026be.zip
We don't need image_file in the live payload.
/ is always mounted for us anyway, and since we're using rsync it's just a simple matter of copying from that directory to our destination.
Diffstat (limited to 'pyanaconda/packaging')
-rw-r--r--pyanaconda/packaging/__init__.py5
-rw-r--r--pyanaconda/packaging/livepayload.py5
2 files changed, 2 insertions, 8 deletions
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index d693bbc12..dcfc0274a 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -620,11 +620,10 @@ class ImagePayload(Payload):
""" An ImagePayload installs an OS image to the target system. """
def __init__(self, data):
super(ImagePayload, self).__init__(data)
- self.image_file = None
def setup(self, storage):
- if not self.image_file:
- exn = PayloadSetupError("image file not set")
+ if not os.path.ismount("/run/initramfs/live"):
+ exn = PayloadSetupError("live image is not mounted")
if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index 6a27a4fd0..d6c1c3179 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -47,11 +47,6 @@ from pyanaconda.errors import *
class LiveImagePayload(ImagePayload):
""" A LivePayload copies the source image onto the target system. """
- def setup(self, storage):
- super(LiveImagePayload, self).setup(storage)
- if not stat.S_ISBLK(os.stat(self.image_file)[stat.ST_MODE]):
- raise PayloadSetupError("unable to find image")
-
def install(self):
""" Install the payload. """
cmd = "rsync"