From 8534ea0481791d525f2d497d6bad94540a8e589e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=98=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 19 Jul 2022 17:14:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3=D0=BE=20=D0=BF=D1=83=D1=82?= =?UTF-8?q?=D0=B8=20=D0=BA=20=D0=BF=D0=BE=D1=80=D1=82=D0=B5=D0=B6=D0=B0?= =?UTF-8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/variables/update.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 419391d..bedce9e 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -192,17 +192,21 @@ class VariableClUpdateRepPath(ReadonlyVariable): Пути до репозиториев """ type = "list" - mapPath = {'portage': 'usr/portage', - 'gentoo': 'usr/portage'} def get(self): repPath = self.Get('cl_update_repos_storage') chroot_path = self.Get('cl_chroot_path') + if os.path.isdir(path.join(chroot_path, 'var/db/repos/gentoo')): + mapPath = {'portage': 'var/db/repos/gentoo', + 'gentoo': 'var/db/repos/gentoo'} + else: + mapPath = {'portage': 'usr/portage', + 'gentoo': 'usr/portage'} def generatePaths(names): for name in names: - if name in self.mapPath: - yield path.join(chroot_path, self.mapPath[name]) + if name in mapPath: + yield path.join(chroot_path, mapPath[name]) else: yield path.join(repPath, name)