Browse Source

Исправлено определение запущенного emerge

tags/3.6.7.7
parent
commit
7fd17fd332
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      pym/update/update.py

+ 6
- 2
pym/update/update.py View File

@@ -55,6 +55,7 @@ from calculate.lib.utils.text import _u8, _u

Colors = TextState.Colors
from calculate.lib.utils.files import (getProgPath, STDOUT, removeDir,
getParentPids,
PercentProgress, process, getRunCommands,
readFile, listDirectory, pathJoin,
find, FindFileType,quite_unlink,
@@ -318,8 +319,11 @@ class Update(MethodsInterface):
self.endTask()

if self.clVars.Get('cl_chroot_status') == 'off':
emerge_running = lambda: any(fnmatch(x, "*python-exec/*/emerge*")
for x in getRunCommands(True))
parents_pids = set(getParentPids(os.getpid()))
emerge_running = lambda : (
any((fnmatch(x[1], "*python-exec/*/emerge*") and
x[0] not in parents_pids)
for x in getRunCommands(True, withpid=True)))
if emerge_running():
if not wait_update:
raise UpdateError(_("Emerge is running. "


Loading…
Cancel
Save