|
|
|
@ -1944,12 +1944,24 @@ class Builder(Update):
|
|
|
|
|
shutil.move(real_vdb_path, hide_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|
raise BuilderError(_("Failed to hide package database"))
|
|
|
|
|
system_ini = SystemIni(self.clVars.Get('cl_builder_linux_datavars'))
|
|
|
|
|
skip_autodeps = system_ini.getVar('builder', 'skip-autodeps')
|
|
|
|
|
if skip_autodeps:
|
|
|
|
|
try:
|
|
|
|
|
skip_autodeps = skip_autodeps.split(',')
|
|
|
|
|
os.mkdir(real_vdb_path)
|
|
|
|
|
for pkg in skip_autodeps:
|
|
|
|
|
self.skip_automagic(pkg, hide_vdb_path, real_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|
if path.exists(real_vdb_path):
|
|
|
|
|
shutil.rmtree(real_vdb_path)
|
|
|
|
|
|
|
|
|
|
shutil.move(hide_vdb_path, real_vdb_path)
|
|
|
|
|
|
|
|
|
|
automagic = OrderedDict()
|
|
|
|
|
automagic_waste = {}
|
|
|
|
|
automagic_clear = {}
|
|
|
|
|
try:
|
|
|
|
|
system_ini = SystemIni(self.clVars.Get('cl_builder_linux_datavars'))
|
|
|
|
|
lp = LibraryProviders(vdb_path=vdb_path, prefix=builder_path)
|
|
|
|
|
|
|
|
|
|
def get_check_data():
|
|
|
|
@ -2016,7 +2028,7 @@ class Builder(Update):
|
|
|
|
|
finally:
|
|
|
|
|
try:
|
|
|
|
|
if path.exists(real_vdb_path):
|
|
|
|
|
os.rmdir(real_vdb_path)
|
|
|
|
|
shutil.rmtree(real_vdb_path)
|
|
|
|
|
shutil.move(hide_vdb_path, real_vdb_path)
|
|
|
|
|
except (IOError, OSError):
|
|
|
|
|
raise BuilderError(_("Failed to unhide package database"))
|
|
|
|
@ -2024,6 +2036,24 @@ class Builder(Update):
|
|
|
|
|
self._rebuild_automagic(automagic, automagic_clear, builder_path)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def skip_automagic(self, pkg, hide_path, real_path):
|
|
|
|
|
"""
|
|
|
|
|
Пропустить проверку зависимостей у пакета
|
|
|
|
|
"""
|
|
|
|
|
category, pkg_name = pkg.split('/')
|
|
|
|
|
if not path.exists(path.join(hide_path, category)):
|
|
|
|
|
return
|
|
|
|
|
re_pkg = re.compile(f"{pkg_name}-\d.*")
|
|
|
|
|
pkg_list = [x for x in os.listdir(path.join(hide_path, category)) if re_pkg.match(x)]
|
|
|
|
|
if not pkg_list:
|
|
|
|
|
return
|
|
|
|
|
if not path.exists(real_path):
|
|
|
|
|
os.mkdir(real_path)
|
|
|
|
|
if not path.exists(path.join(real_path, category)):
|
|
|
|
|
os.mkdir(path.join(real_path, category))
|
|
|
|
|
for pkg_version in pkg_list:
|
|
|
|
|
shutil.copytree(path.join(hide_path, category, pkg_version), path.join(real_path, category, pkg_version))
|
|
|
|
|
|
|
|
|
|
def _report_automagic(self, automagic, automagic_clear, automagic_waste):
|
|
|
|
|
"""
|
|
|
|
|
Сообщить информацию о вычисленных автоматических зависимостей
|
|
|
|
|