Browse Source

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

tags/3.6.9.1
parent
commit
2451599fdf
2 changed files with 23 additions and 0 deletions
  1. +20
    -0
      pym/update/update.py
  2. +3
    -0
      pym/update/utils/cl_update.py

+ 20
- 0
pym/update/update.py View File

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

+ 3
- 0
pym/update/utils/cl_update.py View File

@@ -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': [


Loading…
Cancel
Save