|
|
@ -35,6 +35,7 @@ from calculate.update.update_info import UpdateInfo
|
|
|
|
from calculate.lib.utils.binhosts import (Binhosts, BinhostSignError,
|
|
|
|
from calculate.lib.utils.binhosts import (Binhosts, BinhostSignError,
|
|
|
|
BinhostError, PackagesIndex, DAYS)
|
|
|
|
BinhostError, PackagesIndex, DAYS)
|
|
|
|
from calculate.lib.utils.gpg import GPG, GPGError
|
|
|
|
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
|
|
|
|
from calculate.lib.cl_log import log
|
|
|
|
import hashlib
|
|
|
|
import hashlib
|
|
|
|
import re
|
|
|
|
import re
|
|
|
@ -1734,3 +1735,22 @@ class Update(MethodsInterface):
|
|
|
|
new_portage_state_hash = ps.get_state()
|
|
|
|
new_portage_state_hash = ps.get_state()
|
|
|
|
ini.setVar('system', {'portage_hash': new_portage_state_hash})
|
|
|
|
ini.setVar('system', {'portage_hash': new_portage_state_hash})
|
|
|
|
return True
|
|
|
|
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
|
|
|
|