From 5a20e18d5e78cc45ef09e8db8ab2eebf8d2bea44 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: Thu, 23 Aug 2018 14:27:57 +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=20=D0=B2=D1=8B=D0=B7=D0=BE=D0=B2=20update=5Flayman?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 6 ++---- pym/update/utils/cl_update.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pym/update/update.py b/pym/update/update.py index 102a67e..f15cce3 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -1390,8 +1390,6 @@ class Update(MethodsInterface): pi["TTL"] = str(30 * DAYS) pi["DOWNLOAD_TIMESTAMP"] = str(int(time.time())) pi.write(f) - with writeFile("/tmp/Packages.org") as f: - f.write(orig_packages) except (OSError, IOError): raise UpdateError(_("Failed to save Packages")) self.endTask(True) @@ -1606,7 +1604,7 @@ class Update(MethodsInterface): self.endTask() return True - def update_layman(self, chroot_path): + def update_layman(self): """ Обновить базу layman :param builder_path: @@ -1616,6 +1614,6 @@ class Update(MethodsInterface): cmd_path = self.get_prog_path(cmd) if not cmd_path: raise UpdateError(_("Failed to find the %s command") % cmd) - layman = CommandExecutor(cmd_path, ["-f"], logfile=logfile) + layman = emerge_parser.CommandExecutor(cmd_path, ["-f"]) layman.execute() return layman.success() diff --git a/pym/update/utils/cl_update.py b/pym/update/utils/cl_update.py index 7ffb7c3..a3c5001 100644 --- a/pym/update/utils/cl_update.py +++ b/pym/update/utils/cl_update.py @@ -143,7 +143,7 @@ def get_synchronization_tasks(object_name): }, {'name': 'update_layman', 'message': __("Layman cache update"), - 'method': "Update.update_layman()", + 'method': Object('update_layman()'), 'condition': lambda Get: isPkgInstalled( "app-portage/layman", prefix=Get('cl_chroot_path')), 'essential': False,