diff --git a/pym/update/update.py b/pym/update/update.py index 9786779..c5cedfb 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -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. "