FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 04-28-2010, 06:41 PM
Hans de Goede
 
Default Remove devices from libparted's cache when destroying them (#586622)

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. """
--
1.7.0.1

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

Thread Tools




All times are GMT. The time now is 07:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org