Browse Source

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

tags/3.6.7.10
parent
commit
3de843415e
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      pym/update/update.py

+ 18
- 0
pym/update/update.py View File

@@ -44,9 +44,12 @@ from contextlib import contextmanager
import tempfile
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.portage import (ReposConf, EmergeLog,
EmergeLogNamedTask,
VDB_PATH,
PackageInformation,
get_packages_files_directory,
get_manifest_files_directory,
@@ -1315,10 +1318,25 @@ class Update(MethodsInterface):
def is_update_action(self, action):
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):
oldval = self.clVars.Get('cl_update_with_bdeps_set')
newval = self.clVars.Get('cl_update_with_bdeps_opt_set')
if oldval != newval:
self.modify_binary_depends(newval)
self.clVars.Write('cl_update_with_bdeps_set', newval,
location="system")
self.clVars.Set('cl_update_force_depclean_set', 'on')


Loading…
Cancel
Save