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 User

 
 
LinkBack Thread Tools
 
Old 09-14-2011, 10:29 PM
David Lehman
 
Default Sort partitioning commmands in anaconda-ks.cfg. (#736527)

---
pyanaconda/storage/__init__.py | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 19abedf..bc9f850 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -35,6 +35,7 @@ from pyanaconda import iutil
from pyanaconda.constants import *
from pykickstart.constants import *
from pyanaconda.flags import flags
+from pyanaconda import tsort

from errors import *
from devices import *
@@ -1282,7 +1283,20 @@ class Storage(object):
else:
dict[action.device.path] = [action]

- for device in [d for d in self.devices if d.format.type != "luks"]:
+ devices = self.devices
+ edges = []
+ for dev in devices:
+ deps = [d for d in devices if dev.dependsOn(d)]
+ for dep in deps:
+ edges.append((devices.index(dep), devices.index(dev)))
+
+ g = tsort.create_graph(range(len(devices)), edges)
+ order = tsort.tsort(g)
+ for idx in order:
+ device = devices[idx]
+ if device.format.type == "luks":
+ continue
+
# If there's no action for the given device, it must be one
# we are reusing.
if not dict.has_key(device.path):
--
1.7.3.4

_______________________________________________
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 06:53 AM.

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