Load multilib configuration from local dir in development

It doesn't have to be installed during development.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2015-11-25 16:19:29 +01:00
parent ba8ae15eb1
commit 496563aaef

View File

@ -16,12 +16,20 @@
import os
import sys
import time
import yum
from ConfigParser import SafeConfigParser
# In development, `here` will point to the bin/ directory with scripts.
here = sys.path[0]
MULTILIBCONF = (os.path.join(os.path.dirname(here), 'share', 'multilib')
if here != '/usr/bin'
else '/usr/share/pungi/multilib')
class Config(SafeConfigParser):
def __init__(self):
SafeConfigParser.__init__(self)
@ -33,7 +41,7 @@ class Config(SafeConfigParser):
self.set('pungi', 'sourcedir', 'source')
self.set('pungi', 'debugdir', 'debug')
self.set('pungi', 'isodir', 'iso')
self.set('pungi', 'multilibconf', '/usr/share/pungi/multilib/')
self.set('pungi', 'multilibconf', MULTILIBCONF)
self.set('pungi', 'relnotefilere', 'LICENSE README-BURNING-ISOS-en_US.txt ^RPM-GPG')
self.set('pungi', 'relnotedirre', '')
self.set('pungi', 'relnotepkgs', 'fedora-repos fedora-release fedora-release-notes')