Добавлено обновление информации для domain-fastlogin

legacy27 3.6.9.1
parent fc0315cd7d
commit 2451599fdf

@ -35,6 +35,7 @@ from calculate.update.update_info import UpdateInfo
from calculate.lib.utils.binhosts import (Binhosts, BinhostSignError,
BinhostError, PackagesIndex, DAYS)
from calculate.lib.utils.gpg import GPG, GPGError
from calculate.lib.utils.common import get_fastlogin_domain_path
from calculate.lib.cl_log import log
import hashlib
import re
@ -1734,3 +1735,22 @@ class Update(MethodsInterface):
new_portage_state_hash = ps.get_state()
ini.setVar('system', {'portage_hash': new_portage_state_hash})
return True
def update_fastlogin_domain_path(self):
try:
if not self.clVars.Get('client.cl_remote_host'):
return True
except:
return True
fn = '/var/lib/calculate/calculate-desktop/fastlogin-domain'
try:
with writeFile(fn) as f:
f.write("{}\n".format(
"\n".join(get_fastlogin_domain_path(self.clVars))))
except Exception:
if os.path.exists(fn):
try:
os.unlink(fn)
except Exception:
pass
return True

@ -257,6 +257,9 @@ class ClUpdateAction(Action):
'method': 'Update.save_with_bdeps()',
'essential': False
},
{'name': 'update_fastlogin_domain',
'method': "Update.update_fastlogin_domain_path()"
},
{'name': 'premerge_group',
'group': __("Checking for updates"),
'tasks': [

Caricamento…
Annulla
Salva