Browse Source

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

master3.3
Mike Khiretskiy 8 years ago
parent
commit
2bec0bd353
  1. 23
      update/update.py
  2. 6
      update/wsdl_update.py

23
update/update.py

@ -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):

6
update/wsdl_update.py

@ -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