Hey list: Wouldn't the attached patch be better? We have the added value of doing all the stuff we do for the media when we have it. Additionally, since we are checking that self.ayum.tree exist and is mounted, I dont think it should be in an elif. Regards. On Mon, Aug 10, 2009 at 11:45:10AM -0400, Chris Lumens wrote: > --- > yuminstall.py | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/yuminstall.py b/yuminstall.py > index 84445b0..a56fd71 100644 > --- a/yuminstall.py > +++ b/yuminstall.py > @@ -1036,7 +1036,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon > "%s/var/cache/yum/%s" %(anaconda.rootPath, repo)) > except Exception, e: > log.debug("Error setting up media repository: %s" %(e,)) > - else: > + elif os.path.exists(self.ayum.tree) and os.path.ismount(self.ayum.tree): > isys.umount(self.ayum.tree) > > anaconda.backend.removeInstallImage() > -- > 1.6.1.3 > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list -- Joel Andres Granados Brno, Czech Republic, Red Hat.
From 02c42c188a278bef05d49ff52c36b5767610430e Mon Sep 17 00:00:00 2001 From: Joel Granados Moreno <jgranado@xxxxxxxxxx> Date: Mon, 10 Aug 2009 18:17:23 +0200 Subject: [PATCH] stage2 argument can also activeate mediaDevice. --- anaconda | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/anaconda b/anaconda index 705edca..c366bbe 100755 --- a/anaconda +++ b/anaconda @@ -488,6 +488,11 @@ class Anaconda: b = instClass.getBackend() self.backend = apply(b, (self,)) + def setStage2str(self, stage2str): + if stage2str.startswith("cdrom://"): + self.mediaDevice = stage2str[8:].split(":")[0] + self.stage2 = stage2str + def setMethodstr(self, methodstr): if methodstr.startswith("cdrom://"): (device, tree) = string.split(methodstr[8:], ":", 1) @@ -635,7 +640,7 @@ if __name__ == "__main__": if opts.stage2[0] == '@': opts.stage2 = expandFTPMethod(opts.stage2) - anaconda.stage2 = opts.stage2 + anaconda.setStage2str(opts.stage2) if opts.liveinst: flags.livecdInstall = True -- 1.6.0.6
From 30fcfb0caae429da4550585d4982ff3eae6b4db6 Mon Sep 17 00:00:00 2001 From: Joel Granados Moreno <jgranado@xxxxxxxxxx> Date: Mon, 10 Aug 2009 18:17:01 +0200 Subject: [PATCH] Only unmount the tree if it is there and mounted. --- yuminstall.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/yuminstall.py b/yuminstall.py index 84445b0..3dbc92e 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1036,7 +1036,8 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon "%s/var/cache/yum/%s" %(anaconda.rootPath, repo)) except Exception, e: log.debug("Error setting up media repository: %s" %(e,)) - else: + + if os.path.exists(self.ayum.tree) and os.path.ismount(self.ayum.tree): isys.umount(self.ayum.tree) anaconda.backend.removeInstallImage() -- 1.6.0.6
Attachment:
pgp6BKm6zgVpi.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list