Too many packages have release- in the name in rawhide. This is
confusing the import and guessing the wrong flavor and os_version.
I also included a kickstart associating patch which will try flavor.ks
as well.
From 5a93d46f80685b0e1df889319e422c893c099e95 Mon Sep 17 00:00:00 2001
From: Bill Peck <bpeck(a)redhat.com>
Date: Tue, 3 Feb 2009 11:56:20 -0500
Subject: [PATCH] Be more strict on what is a release file.
Also look for flavor.ks if it exists.
---
cobbler/action_import.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 24738cb..19b2f9a 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -987,8 +987,11 @@ class RedHatImporter ( BaseImporter ) :
data = glob.glob(os.path.join(self.get_pkgdir(), "*release-*"))
data2 = []
for x in data:
- if x.find("generic") == -1:
- data2.append(x)
+ b = os.path.basename(x)
+ if b.find("fedora") != -1 or \
+ b.find("redhat") != -1 or \
+ b.find("centos") != -1:
+ data2.append(x)
return data2
# ================================================================
@@ -1100,13 +1103,14 @@ class RedHatImporter ( BaseImporter ) :
# OS_VERSION next
# OS_VERSION.MINOR next
# ARCH/default.ks next
- # default.ks finally.
+ # FLAVOR.ks next
kickstarts = [
"%s/%s/%s.%i.ks" % (kickbase,arch,os_version,int(minor)),
"%s/%s/%s.ks" % (kickbase,arch,os_version),
"%s/%s.%i.ks" % (kickbase,os_version,int(minor)),
"%s/%s.ks" % (kickbase,os_version),
"%s/%s/default.ks" % (kickbase,arch),
+ "%s/%s.ks" % (kickbase,flavor),
]
for kickstart in kickstarts:
if os.path.exists(kickstart):
--
1.6.0.6