Добавлено изменение сборочных зависимостей бинарных пакетов в зависимости от bdeps

legacy27 3.6.7.10
parent a08838f21d
commit 3de843415e

@ -44,9 +44,12 @@ from contextlib import contextmanager
import tempfile import tempfile
from fnmatch import fnmatch from fnmatch import fnmatch
from calculate.lib.utils.vardb import Vardb
from calculate.lib.utils.git import Git, GitError, MTimeKeeper, NotGitError from calculate.lib.utils.git import Git, GitError, MTimeKeeper, NotGitError
from calculate.lib.utils.portage import (ReposConf, EmergeLog, from calculate.lib.utils.portage import (ReposConf, EmergeLog,
EmergeLogNamedTask, EmergeLogNamedTask,
VDB_PATH,
PackageInformation, PackageInformation,
get_packages_files_directory, get_packages_files_directory,
get_manifest_files_directory, get_manifest_files_directory,
@ -1315,10 +1318,25 @@ class Update(MethodsInterface):
def is_update_action(self, action): def is_update_action(self, action):
return action == 'sync' return action == 'sync'
def modify_binary_depends(self, bdeps, prefix="/"):
"""
Включить/выключить сборочные зависимости для бинарных пакетов
"""
hide = bdeps == "auto"
self.startTask(_("Updating binary build dependences"))
vardb = Vardb(pathJoin(prefix,VDB_PATH))
if hide:
vardb.hide_binary_depends()
else:
vardb.unhide_binary_depends()
self.endTask()
return True
def save_with_bdeps(self): def save_with_bdeps(self):
oldval = self.clVars.Get('cl_update_with_bdeps_set') oldval = self.clVars.Get('cl_update_with_bdeps_set')
newval = self.clVars.Get('cl_update_with_bdeps_opt_set') newval = self.clVars.Get('cl_update_with_bdeps_opt_set')
if oldval != newval: if oldval != newval:
self.modify_binary_depends(newval)
self.clVars.Write('cl_update_with_bdeps_set', newval, self.clVars.Write('cl_update_with_bdeps_set', newval,
location="system") location="system")
self.clVars.Set('cl_update_force_depclean_set', 'on') self.clVars.Set('cl_update_force_depclean_set', 'on')

Loading…
Cancel
Save