--- pyanaconda/packaging/__init__.py | 1 - pyanaconda/packaging/livepayload.py | 2 ++ pyanaconda/packaging/tarpayload.py | 2 +- pyanaconda/packaging/yumpayload.py | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index b7402c7..e415fbb 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -147,7 +147,6 @@ class Payload(object): def setup(self, storage): """ Do any payload-specific setup. """ self.storage = storage - raise NotImplementedError()
def preStorage(self): """ Do any payload-specific work necessary before writing the storage diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py index 78ff9e9..e47f46f 100644 --- a/pyanaconda/packaging/livepayload.py +++ b/pyanaconda/packaging/livepayload.py @@ -53,6 +53,8 @@ _ = lambda x: gettext.ldgettext("anaconda", x) class LiveImagePayload(ImagePayload): """ A LivePayload copies the source image onto the target system. """ def setup(self, storage): + super(LiveImagePayload, self).setup(storage) + # Mount the live device and copy from it instead of the overlay at / osimg = storage.devicetree.getDeviceByPath(self.data.method.partition) if not stat.S_ISBLK(os.stat(osimg.path)[stat.ST_MODE]): diff --git a/pyanaconda/packaging/tarpayload.py b/pyanaconda/packaging/tarpayload.py index 557bdbf..32361d8 100644 --- a/pyanaconda/packaging/tarpayload.py +++ b/pyanaconda/packaging/tarpayload.py @@ -58,7 +58,7 @@ class TarPayload(ArchivePayload): self.archive = None
def setup(self, storage): - super(TarPayload, self).setup() + super(TarPayload, self).setup(storage)
try: self.archive = tarfile.open(self.image_file) diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 6a22bb6..25372cb 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -150,6 +150,8 @@ class YumPayload(PackagePayload): self._resetYum(root=root)
def setup(self, storage): + super(YumPayload, self).setup(storage) + self._writeYumConfig() self._setup = True
It can get it as an attribute off the Payload object, now that setup is always being called. --- pyanaconda/packaging/__init__.py | 4 ++-- pyanaconda/packaging/yumpayload.py | 7 +++---- pyanaconda/ui/gui/spokes/source.py | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index e415fbb..25d4aa2 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -220,7 +220,7 @@ class Payload(object): self.data.method.proxy = "" self.data.method.opts = None
- def updateBaseRepo(self, storage): + def updateBaseRepo(self): """ Update the base repository from ksdata.method. """ pass
@@ -744,7 +744,7 @@ if __name__ == "__main__": ksdata.method.url = "http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/"
# now switch the base repo to what we set ksdata.method to just above - payload.updateBaseRepo(storage) + payload.updateBaseRepo() for repo in payload._yum.repos.repos.values(): print repo.name, repo.enabled
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 25372cb..6b423fc 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -155,7 +155,7 @@ class YumPayload(PackagePayload): self._writeYumConfig() self._setup = True
- self.updateBaseRepo(storage) + self.updateBaseRepo()
# When setup is called, it's already in a separate thread. That thread # will try to select groups right after this returns, so make sure we @@ -375,8 +375,7 @@ reposdir=%s
return base_repo_name
- def updateBaseRepo(self, storage, fallback=True, root=None, - checkmount=True): + def updateBaseRepo(self, fallback=True, root=None, checkmount=True): """ Update the base repo based on self.data.method.
- Tear down any previous base repo devices, symlinks, &c. @@ -395,7 +394,7 @@ reposdir=%s
# see if we can get a usable base repo from self.data.method try: - self._configureBaseRepo(storage, checkmount=checkmount) + self._configureBaseRepo(self.storage, checkmount=checkmount) except PayloadError as e: if not fallback: for repo in self._yum.repos.repos.values(): diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 6f56523..50545b6 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -507,8 +507,7 @@ class SourceSpoke(NormalSpoke):
communication.send_not_ready("SoftwareSelectionSpoke") try: - self.payload.updateBaseRepo(self.storage, fallback=False, - checkmount=False) + self.payload.updateBaseRepo(fallback=False, checkmount=False) except PayloadError as e: log.error("PayloadError: %s" % (e,)) self._error = True
Ack to both of these.
anaconda-patches@lists.fedorahosted.org