Browse Source

Исправлена проверка на emerge. Исправлен вывод.

tags/3.2.0_beta1
Mike Khiretskiy 7 years ago
parent
commit
2bec0bd353
2 changed files with 15 additions and 14 deletions
  1. +12
    -11
      update/update.py
  2. +3
    -3
      update/wsdl_update.py

+ 12
- 11
update/update.py View File

@@ -136,17 +136,18 @@ class Update:
time.sleep(random.random()*3)
self.endTask()

emerge_running = lambda: any("/usr/bin/emerge" in x
for x in getRunCommands())
if emerge_running():
if not wait_update:
raise UpdateError(_("Emerge is running. "
"Try to run later."))
else:
self.startTask(_("Waiting for emerge to be complete"))
while emerge_running():
time.sleep(1)
self.endTask()
if self.clVars.Get('cl_chroot_status') == 'off':
emerge_running = lambda: any("/usr/bin/emerge" in x
for x in getRunCommands(True))
if emerge_running():
if not wait_update:
raise UpdateError(_("Emerge is running. "
"Try to run later."))
else:
self.startTask(_("Waiting for emerge to be complete"))
while emerge_running():
time.sleep(1)
self.endTask()
return True

def syncRepositories(self, repname, clean_on_error=True):


+ 3
- 3
update/wsdl_update.py View File

@@ -106,9 +106,9 @@ class Wsdl(WsdlBase):
# описание груп (список лямбда функций)
'groups': [
lambda group: group(_("Repository"),
brief=('cl_update_profile_repo_name',
),
hide=("cl_update_profile_rep",),
brief=('cl_update_profile_repo_name',),
hide=('cl_update_profile_rep',
'cl_update_profile_sync_set'),
normal=('cl_update_profile_rep',),
expert=('cl_update_profile_branch',
'cl_update_profile_sync_set')),


Loading…
Cancel
Save