Hi Michael
I've attached two small patches.
1. This sorts to order of systems and profiles on a buildiso .iso.
2. Ensure that directories exist when installing a template-file. The might be a better way of doing this, but it works for me.
Dave
From 9c9501c50b49cafacdd60ddfb1a0eb9a811395fd Mon Sep 17 00:00:00 2001
From: Dave Hatton dave@starground.it Date: Thu, 29 Jan 2009 20:05:54 +0000 Subject: [PATCH] Sort profiles and systems into order on buildsion menu
--- cobbler/action_buildiso.py | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py index 7fa2c5a..eec6054 100644 --- a/cobbler/action_buildiso.py +++ b/cobbler/action_buildiso.py @@ -164,7 +164,13 @@ class BuildIso: cfg.write(HEADER) # fixme, use template
print _("- generating profile list...") - for profile in self.api.profiles(): + #sort the profiles + profile_list = [profile for profile in self.profiles] + def sort_name(a,b): + return cmp(a.name,b.name) + profile_list.sort(sort_name) + + for profile in profile_list: use_this = True if profiles is not None: which_profiles = profiles.split(",") @@ -204,7 +210,13 @@ class BuildIso:
cfg.write("\nMENU SEPARATOR\n")
- for system in self.api.systems(): + #sort the systems + system_list = [system for system in self.systems] + def sort_name(a,b): + return cmp(a.name,b.name) + system_list.sort(sort_name) + + for system in system_list: use_this = False if systems is not None: which_systems = systems.split(",")
Dave Hatton wrote:
Hi Michael
I've attached two small patches.
This sorts to order of systems and profiles on a buildiso .iso.
Ensure that directories exist when installing a template-file. The
might be a better way of doing this, but it works for me.
Dave
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Applied to devel and master (will be in 1.4.2), thanks!
--Michael
cobbler@lists.fedorahosted.org