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:
parent
ba8ae15eb1
commit
496563aaef
@ -16,12 +16,20 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import yum
|
import yum
|
||||||
|
|
||||||
from ConfigParser import SafeConfigParser
|
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):
|
class Config(SafeConfigParser):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
SafeConfigParser.__init__(self)
|
SafeConfigParser.__init__(self)
|
||||||
@ -33,7 +41,7 @@ class Config(SafeConfigParser):
|
|||||||
self.set('pungi', 'sourcedir', 'source')
|
self.set('pungi', 'sourcedir', 'source')
|
||||||
self.set('pungi', 'debugdir', 'debug')
|
self.set('pungi', 'debugdir', 'debug')
|
||||||
self.set('pungi', 'isodir', 'iso')
|
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', 'relnotefilere', 'LICENSE README-BURNING-ISOS-en_US.txt ^RPM-GPG')
|
||||||
self.set('pungi', 'relnotedirre', '')
|
self.set('pungi', 'relnotedirre', '')
|
||||||
self.set('pungi', 'relnotepkgs', 'fedora-repos fedora-release fedora-release-notes')
|
self.set('pungi', 'relnotepkgs', 'fedora-repos fedora-release fedora-release-notes')
|
||||||
|
Loading…
Reference in New Issue
Block a user