Re: [PATCH] Remove devices from libparted's cache when destroying them (#586622)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On second thought, is there any reason not to do this in
StorageDevice.destroy instead of ActionDestroyDevice.execute? Is there
any case in which we would want StorageDevice.destroy to run without
flushing the cache?

Dave

On Wed, 2010-04-28 at 15:56 -0500, David Lehman wrote:
> Patch looks fine. Is this intended for f13-branch as well? If it has
> been tested on any branch I would support its inclusion in F13. Also, it
> looks like your commit message was truncated.
> 
> Dave
> 
> On Wed, 2010-04-28 at 20:41 +0200, Hans de Goede wrote:
> > Leaving them in the cache causes device.size to report the size of
> > the old device if later on a new device with the same name gets
> > created, sometimes leaving to spurious not enough free space to install
> > selected packages. This patch is also for rhel-6 branch where it fixes
> > ---
> >  storage/deviceaction.py |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/storage/deviceaction.py b/storage/deviceaction.py
> > index 859c0f1..4524e7c 100644
> > --- a/storage/deviceaction.py
> > +++ b/storage/deviceaction.py
> > @@ -217,6 +217,11 @@ class ActionDestroyDevice(DeviceAction):
> >      def execute(self, intf=None):
> >          self.device.destroy()
> >  
> > +        # Make sure libparted does not keep cached info for this device
> > +        # and returns it when we create a new device with the same name
> > +        if self.device.partedDevice:
> > +            self.device.partedDevice.removeFromCache()
> > +
> >  
> >  class ActionResizeDevice(DeviceAction):
> >      """ An action representing the resizing of an existing device. """
> 
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux