Merge "Ubuntu custom apt repos"
This commit is contained in:
commit
16630340c7
@ -410,6 +410,19 @@ class KollaWorker(object):
|
|||||||
|
|
||||||
return rpm_setup
|
return rpm_setup
|
||||||
|
|
||||||
|
def copy_apt_files(self):
|
||||||
|
if self.conf.apt_sources_list:
|
||||||
|
shutil.copyfile(
|
||||||
|
self.conf.apt_sources_list,
|
||||||
|
os.path.join(self.working_dir, "base", "sources.list")
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.conf.apt_preferences:
|
||||||
|
shutil.copyfile(
|
||||||
|
self.conf.apt_preferences,
|
||||||
|
os.path.join(self.working_dir, "base", "apt_preferences")
|
||||||
|
)
|
||||||
|
|
||||||
def setup_working_dir(self):
|
def setup_working_dir(self):
|
||||||
"""Creates a working directory for use while building"""
|
"""Creates a working directory for use while building"""
|
||||||
ts = time.time()
|
ts = time.time()
|
||||||
@ -417,6 +430,7 @@ class KollaWorker(object):
|
|||||||
self.temp_dir = tempfile.mkdtemp(prefix='kolla-' + ts)
|
self.temp_dir = tempfile.mkdtemp(prefix='kolla-' + ts)
|
||||||
self.working_dir = os.path.join(self.temp_dir, 'docker')
|
self.working_dir = os.path.join(self.temp_dir, 'docker')
|
||||||
shutil.copytree(self.images_dir, self.working_dir)
|
shutil.copytree(self.images_dir, self.working_dir)
|
||||||
|
self.copy_apt_files()
|
||||||
LOG.debug('Created working dir: %s', self.working_dir)
|
LOG.debug('Created working dir: %s', self.working_dir)
|
||||||
|
|
||||||
def set_time(self):
|
def set_time(self):
|
||||||
|
@ -141,7 +141,9 @@ _BASE_OPTS = [
|
|||||||
cfg.ListOpt('rpm_setup_config', default=[DELOREAN, DELOREAN_DEPS],
|
cfg.ListOpt('rpm_setup_config', default=[DELOREAN, DELOREAN_DEPS],
|
||||||
deprecated_group='kolla-build',
|
deprecated_group='kolla-build',
|
||||||
help=('Comma separated list of .rpm or .repo file(s) '
|
help=('Comma separated list of .rpm or .repo file(s) '
|
||||||
'or URL(s) to install before building containers'))
|
'or URL(s) to install before building containers')),
|
||||||
|
cfg.StrOpt('apt_sources_list', help=('Path to custom sources.list')),
|
||||||
|
cfg.StrOpt('apt_preferences', help=('Path to custom apt/preferences'))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user