On Tue, 2009-03-24 at 10:56 -0400, Chris Lumens wrote: > --- > instdata.py | 25 ------------------------- > storage/__init__.py | 31 +++++++++++++++++++++++++++++-- > 2 files changed, 29 insertions(+), 27 deletions(-) > Ack. > diff --git a/instdata.py b/instdata.py > index e9a6624..0b6df52 100644 > --- a/instdata.py > +++ b/instdata.py > @@ -88,31 +88,6 @@ class InstallData: > # XXX I still expect this to die when kickstart is the data store. > self.ksdata = None > > - # We don't have install methods anymore, but put things that depend on > - # the methodstr here. > - if os.path.exists("/dev/live") and \ > - stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]): > - target = os.readlink("/dev/live") > - self.storage.protectedPartitions = [target] > - elif self.anaconda.methodstr and self.anaconda.methodstr.startswith("hd:"): > - method = self.anaconda.methodstr[3:] > - devspec = method.split(":", 3)[0] > - > - # XXX might as well move resolveDevice into DeviceTree > - device = storage.resolveDevice(self.storage.devicetree, devspec) > - if device is None: > - if self.getUpgrade(): > - return > - else: > - self.anaconda.intf.messageWindow(_("Unknown Device"), > - _("The installation source given by device %s " > - "could not be found. Please check your " > - "parameters and try again.") % device, > - type="custom", custom_buttons = [_("_Exit installer")]) > - sys.exit(1) > - > - self.storage.protectedPartitions = [device.name] > - > def setInstallProgressClass(self, c): > self.instProgress = c > > diff --git a/storage/__init__.py b/storage/__init__.py > index 3c1394c..9532f88 100644 > --- a/storage/__init__.py > +++ b/storage/__init__.py > @@ -54,14 +54,41 @@ import logging > log = logging.getLogger("storage") > > def storageInitialize(anaconda): > - anaconda.id.storage.shutdown() > + storage = anaconda.id.storage > + > + storage.shutdown() > > if anaconda.dir == DISPATCH_BACK: > return > > # XXX I don't understand why I have to do this > udev_trigger(subsystem="block") > - anaconda.id.storage.reset() > + > + # Set up the protected partitions list now. > + if os.path.exists("/dev/live") and \ > + stat.S_ISBLK(os.stat("/dev/live")[stat.ST_MODE]): > + target = os.readlink("/dev/live") > + storage.protectedPartitions = [target] > + elif anaconda.methodstr and anaconda.methodstr.startswith("hd:"): > + method = anaconda.methodstr[3:] > + devspec = method.split(":", 3)[0] > + > + # XXX might as well move resolveDevice into DeviceTree > + device = storage.resolveDevice(storage.devicetree, devspec) > + if device is None: > + if self.getUpgrade(): > + return > + else: > + anaconda.intf.messageWindow(_("Unknown Device"), > + _("The installation source given by device %s " > + "could not be found. Please check your " > + "parameters and try again.") % devspec, > + type="custom", custom_buttons = [_("_Exit installer")]) > + sys.exit(1) > + > + storage.protectedPartitions = [device.name] > + > + storage.reset() > > # dispatch.py helper function > def storageComplete(anaconda): _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list