From 046b51a77117a44f9d1d4d2b31649bf768c7ac7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Mon, 27 Aug 2018 17:46:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=BE=D0=B3=D0=BE=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/builder/builder.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pym/builder/builder.py b/pym/builder/builder.py index f96e482..d4a9af1 100644 --- a/pym/builder/builder.py +++ b/pym/builder/builder.py @@ -31,6 +31,7 @@ from calculate.lib.utils.common import CmdlineParams, getTupleVersion from calculate.lib.utils.portage import (BinaryPackage, get_binary_file, EixVersionParser, clear_binhost_garbage, WorldFile) +from calculate.lib.utils.binhosts import Binhosts from calculate.lib.utils.files import ( pathJoin, PercentProgress, getProgPath, process, STDOUT, removeDir, makeDirectory, writeFile, readLinesFile, chmod, chown, FilePermission, @@ -106,6 +107,7 @@ class Builder(Update): self.refresh_binhost = False self.gpgdata_md5 = [] self.gpg_changed = False + self.base = False def mount_target(self, target): dir_distro = target.convertToDirectory() @@ -2082,8 +2084,28 @@ class Builder(Update): self.clVars.Set('cl_update_package_cache_set', 'on') self.clVars.Set('cl_update_binhost_list', [binhost], force=True) self.clVars.Set('cl_update_binhost_unstable_list', [binhost], force=True) + self.base = True return True + def create_binhost_data(self): + dv = self.clVars + last_ts = dv.Get('update.cl_update_last_timestamp') + if dv.GetBool('update.cl_update_binhost_stable_opt_set'): + binhost_list = dv.Get('update.cl_update_binhost_list') + else: + binhost_list = dv.Get('update.cl_update_binhost_unstable_list') + self.binhosts_data = Binhosts( + # значение малозначимо, поэтому берётся из собирающей системы + dv.GetInteger('update.cl_update_binhost_timeout'), + dv.Get('update.cl_update_binhost_revision_path'), + dv.Get('update.cl_update_binhost_timestamp_path'), + last_ts, binhost_list, + self.get_arch_machine(), + gpg=dv.Get('update.cl_update_gpg'), + base=self.base) + return True + + def index_pkgdir(self, pkgdir, trunkdir, stabledir): """ Спрять pkgdir при использование base binhost, для корректного вычисления