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 > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-09-2009, 08:28 PM
David Lehman
 
Default Only populate the device tree on demand.

We don't really want the tree populated when we instantiate it,
so don't populate it until someone calls its populate method.
---
storage/devicetree.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1692b0e..7bd9ecc 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -170,8 +170,6 @@ class DeviceTree(object):
if luksDict and isinstance(luksDict, dict):
self.__luksDevs = luksDict

- self._populate()
-
def pruneActions(self):
""" Prune loops and redundant actions from the queue. """
# handle device destroy actions
@@ -1101,7 +1099,7 @@ class DeviceTree(object):
log.info("setup of %s failed: %s"
% (lv_device.name, e))

- def _populate(self):
+ def populate(self):
""" Locate all storage devices. """
# each iteration scans any devices that have appeared since the
# previous iteration
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-09-2009, 08:34 PM
David Lehman
 
Default Only populate the device tree on demand.

We don't really want the tree populated when we instantiate it,
so don't populate it until someone calls its populate method.
---
storage/__init__.py | 2 ++
storage/devicetree.py | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 51a892d..4d8c13b 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -167,6 +167,7 @@ class Storage(object):
self.defaultFSType = get_default_filesystem_type()
self.defaultBootFSType = get_default_filesystem_type(boot=True)

+ # these will both be empty until our reset method gets called
self.devicetree = DeviceTree(intf=self.anaconda.intf,
ignored=self.ignoredDisks,
exclusive=self.exclusiveDisks,
@@ -216,6 +217,7 @@ class Storage(object):
zeroMbr=self.zeroMbr,
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs)
+ self.devicetree.populate()
self.fsset = FSSet(self.devicetree)
w.pop()

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1692b0e..7bd9ecc 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -170,8 +170,6 @@ class DeviceTree(object):
if luksDict and isinstance(luksDict, dict):
self.__luksDevs = luksDict

- self._populate()
-
def pruneActions(self):
""" Prune loops and redundant actions from the queue. """
# handle device destroy actions
@@ -1101,7 +1099,7 @@ class DeviceTree(object):
log.info("setup of %s failed: %s"
% (lv_device.name, e))

- def _populate(self):
+ def populate(self):
""" Locate all storage devices. """
# each iteration scans any devices that have appeared since the
# previous iteration
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-09-2009, 11:55 PM
David Cantrell
 
Default Only populate the device tree on demand.

On 03/09/2009 11:34 AM, David Lehman wrote:

We don't really want the tree populated when we instantiate it,
so don't populate it until someone calls its populate method.
---
storage/__init__.py | 2 ++
storage/devicetree.py | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 51a892d..4d8c13b 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -167,6 +167,7 @@ class Storage(object):
self.defaultFSType = get_default_filesystem_type()
self.defaultBootFSType = get_default_filesystem_type(boot=True)

+ # these will both be empty until our reset method gets called
self.devicetree = DeviceTree(intf=self.anaconda.intf,
ignored=self.ignoredDisks,
exclusive=self.exclusiveDisks,
@@ -216,6 +217,7 @@ class Storage(object):
zeroMbr=self.zeroMbr,
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs)
+ self.devicetree.populate()
self.fsset = FSSet(self.devicetree)
w.pop()

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1692b0e..7bd9ecc 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -170,8 +170,6 @@ class DeviceTree(object):
if luksDict and isinstance(luksDict, dict):
self.__luksDevs = luksDict

- self._populate()
-
def pruneActions(self):
""" Prune loops and redundant actions from the queue. """
# handle device destroy actions
@@ -1101,7 +1099,7 @@ class DeviceTree(object):
log.info("setup of %s failed: %s"
% (lv_device.name, e))

- def _populate(self):
+ def populate(self):
""" Locate all storage devices. """
# each iteration scans any devices that have appeared since the
# previous iteration


Looks good.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
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 03:46 PM.

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