rpms/koji/EL-5 0001-soft-dependencies-for-livecd-code.patch, NONE, 1.1 koji.spec, 1.9, 1.10

Dennis Gilmore ausil at fedoraproject.org
Sun Dec 6 16:28:33 UTC 2009


Author: ausil

Update of /cvs/pkgs/rpms/koji/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17441

Modified Files:
	koji.spec 
Added Files:
	0001-soft-dependencies-for-livecd-code.patch 
Log Message:
add patch to make livcd optional. the pykickstart in rhel5 is too old to work


0001-soft-dependencies-for-livecd-code.patch:
 builder/kojid |   21 +++++++++++++++++----
 koji.spec     |    3 ---
 2 files changed, 17 insertions(+), 7 deletions(-)

--- NEW FILE 0001-soft-dependencies-for-livecd-code.patch ---
>From 43af4add203e01803f32c4847e0a79afc16916e5 Mon Sep 17 00:00:00 2001
From: Mike McLean <mikem at redhat.com>
Date: Thu, 3 Dec 2009 15:52:23 -0500
Subject: [PATCH 1/2] soft dependencies for livecd code

---
 builder/kojid |   21 +++++++++++++++++----
 koji.spec     |    2 --
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/builder/kojid b/builder/kojid
index 8e2ea80..af81534 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -58,10 +58,18 @@ from gzip import GzipFile
 from optparse import OptionParser
 from StringIO import StringIO
 from xmlrpclib import Fault
-import pykickstart.parser as ksparser
-import pykickstart.handlers.control as kscontrol
-import hashlib
-import iso9660 # from pycdio
+
+#imports for LiveCD handler
+livecd_enabled = False
+try:
+    import pykickstart.parser as ksparser
+    import pykickstart.handlers.control as kscontrol
+    import hashlib
+    import iso9660 # from pycdio
+    livecd_enabled = True
+except ImportError:
+    pass
+
 
 # our private modules
 sys.path.insert(0, '/usr/share/koji-builder/lib')
@@ -2181,6 +2189,11 @@ class LiveCDTask(BaseTaskHandler):
         if not opts:
             opts = {}
 
+        if not livecd_enabled:
+            self.logger.error("LiveCD features require the following dependencies: "
+                    "pykickstart, pycdio, and possibly python-hashlib")
+            raise koji.LiveCDError, 'LiveCD functions not available'
+
         global options
         target_info = session.getBuildTarget(target, strict=True)
         build_tag = target_info['build_tag']
diff --git a/koji.spec b/koji.spec
index 6eada73..7899e8c 100644
--- a/koji.spec
+++ b/koji.spec
@@ -68,8 +68,6 @@ Requires: /usr/bin/svn
 Requires: /usr/bin/git
 Requires: rpm-build
 Requires: redhat-rpm-config
-Requires: pykickstart
-Requires: pycdio
 %if 0%{?rhel} >= 5
 Requires: createrepo >= 0.4.11-2
 %endif
-- 
1.6.5.2



Index: koji.spec
===================================================================
RCS file: /cvs/pkgs/rpms/koji/EL-5/koji.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- koji.spec	20 Nov 2009 19:20:55 -0000	1.9
+++ koji.spec	6 Dec 2009 16:28:33 -0000	1.10
@@ -2,12 +2,14 @@
 
 Name: koji
 Version: 1.3.2
-Release: 1%{?dist}
+Release: 1%{?dist}.1
 License: LGPLv2
 Summary: Build system tools
 Group: Applications/System
 URL: http://fedorahosted.org/koji
+#customises koji for Fedora's koji
 Patch0: fedora-config.patch
+Patch1: 0001-soft-dependencies-for-livecd-code.patch
 Source: https://fedorahosted.org/koji/attachment/wiki/KojiRelease/%{name}-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -58,10 +60,10 @@ Requires: /usr/bin/svn
 Requires: /usr/bin/git
 Requires: rpm-build
 Requires: redhat-rpm-config
-Requires: pykickstart                                                                               
-Requires: pycdio   
 %if 0%{?fedora}
 Requires: createrepo >= 0.9.6
+Requires: pykickstart                                                                               
+Requires: pycdio   
 %endif
 %if 0%{?rhel}
 Requires: python-createrepo >= 0.9.6
@@ -181,6 +183,9 @@ if [ $1 = 0 ]; then
 fi
 
 %changelog
+* Sun Dec 06 2009 Dennis Gilmore <dennis at ausil.us> - 1.3.2-1.1
+- add patch to make livecd support optional. the pykickstart in RHEL 5 is too old
+
 * Fri Nov 20 2009 Dennis Gilmore <dennis at ausil.us> - 1.3.2-1
 - update to 1.3.2
 




More information about the scm-commits mailing list