soft dependencies for livecd code
This commit is contained in:
parent
32837bd09d
commit
43af4add20
2 changed files with 17 additions and 6 deletions
|
|
@ -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']
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue