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 Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-15-2010, 08:24 PM
Peter Jones
 
Default Add mpath device to selection instead of its constituents.

If we've got an mpath device in FilterWindow, it should be added to the
selection, not the constituent devices for each path.
---
iw/filter_gui.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 9b43b55..bac109b 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -364,10 +364,13 @@ class FilterWindow(InstallWindow):
# are in the list.
selected = set()
for dev in self.pages[0].ds.getSelected():
- for path in dev[PATHS_COL].split():
- selected.add(path)
+ if udev_device_is_multipath_member(dev[OBJECT_COL]):
+ selected.add(udev_device_get_multipath_name(dev[OBJECT_COL]))
+ else:
+ for path in dev[PATHS_COL].split():
+ selected.add(path)

- selected.add(udev_device_get_name(dev[OBJECT_COL]))
+ selected.add(udev_device_get_name(dev[OBJECT_COL]))

if len(selected) == 0:
self.anaconda.intf.messageWindow(_("Error"),
--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-20-2010, 03:20 PM
Chris Lumens
 
Default Add mpath device to selection instead of its constituents.

This is absolutely the sort of thing we need to be doing here, and we're
going to need to do the same sort of checking for biosraid, too.

> diff --git a/iw/filter_gui.py b/iw/filter_gui.py
> index 9b43b55..bac109b 100644
> --- a/iw/filter_gui.py
> +++ b/iw/filter_gui.py
> @@ -364,10 +364,13 @@ class FilterWindow(InstallWindow):
> # are in the list.
> selected = set()
> for dev in self.pages[0].ds.getSelected():
> - for path in dev[PATHS_COL].split():
> - selected.add(path)
> + if udev_device_is_multipath_member(dev[OBJECT_COL]):
> + selected.add(udev_device_get_multipath_name(dev[OBJECT_COL]))
> + else:
> + for path in dev[PATHS_COL].split():
> + selected.add(path)

You shouldn't need these two lines anymore, since the only time we stick
anything into PATHS_COL is for mpath devices and you've already taken
care of that case.

I don't think you need to iterate over dev[PATHS_COL] like this anymore,
since the only time we stick anything into PATHS_COL is for mpath
devices and you've already taken care of that case.

>
> - selected.add(udev_device_get_name(dev[OBJECT_COL]))
> + selected.add(udev_device_get_name(dev[OBJECT_COL]))
>
> if len(selected) == 0:
> self.anaconda.intf.messageWindow(_("Error"),

Yeah, this should be sufficient.

- Chris

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

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