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)