|
|
|
@ -77,14 +77,14 @@ class OverlayOwnCache(MutableSet):
|
|
|
|
|
self.dv = dv
|
|
|
|
|
|
|
|
|
|
def __get_overlays(self):
|
|
|
|
|
own_cache_value = SystemIni(self.dv).getVar('update', 'own_cache') or ""
|
|
|
|
|
own_cache_value = SystemIni(self.dv).getVar('system', 'own_cache') or ""
|
|
|
|
|
return [x.strip() for x in own_cache_value.split(',') if x.strip()]
|
|
|
|
|
|
|
|
|
|
def __write_overlays(self, overlays):
|
|
|
|
|
if not overlays:
|
|
|
|
|
SystemIni(self.dv).delVar('update', 'own_cache')
|
|
|
|
|
SystemIni(self.dv).delVar('system', 'own_cache')
|
|
|
|
|
else:
|
|
|
|
|
SystemIni(self.dv).setVar('update',
|
|
|
|
|
SystemIni(self.dv).setVar('system',
|
|
|
|
|
{'own_cache': ",".join(overlays)})
|
|
|
|
|
|
|
|
|
|
def __contains__(self, item):
|
|
|
|
@ -223,7 +223,7 @@ class Update(MethodsInterface):
|
|
|
|
|
if not status:
|
|
|
|
|
self.printWARNING(_("Updates autocheck is not enabled"))
|
|
|
|
|
return False
|
|
|
|
|
last_check = SystemIni(self.clVars).getVar('update', 'last_check') or ""
|
|
|
|
|
last_check = SystemIni(self.clVars).getVar('system', 'last_check') or ""
|
|
|
|
|
re_interval = re.compile("^(\d+)\s*(hours?|days?|weeks?)?", re.I)
|
|
|
|
|
interval_match = re_interval.search(interval)
|
|
|
|
|
MINUTE = 60
|
|
|
|
@ -781,7 +781,7 @@ class Update(MethodsInterface):
|
|
|
|
|
"""
|
|
|
|
|
Установить отметку о запуске запланированной проверки
|
|
|
|
|
"""
|
|
|
|
|
SystemIni(self.clVars).setVar('update', {'last_check': str(int(time.time()))})
|
|
|
|
|
SystemIni(self.clVars).setVar('system', {'last_check': str(int(time.time()))})
|
|
|
|
|
|
|
|
|
|
def get_default_emerge_opts(self):
|
|
|
|
|
return self.clVars.Get('cl_emerge_default_opts')
|
|
|
|
@ -1200,7 +1200,7 @@ class Update(MethodsInterface):
|
|
|
|
|
new_ts = new_ts[0]
|
|
|
|
|
if new_ts.isdigit():
|
|
|
|
|
ini = SystemIni(self.clVars)
|
|
|
|
|
ini.setVar('update', {'last_update': new_ts})
|
|
|
|
|
ini.setVar('system', {'last_update': new_ts})
|
|
|
|
|
if self.clVars.Get('cl_action') == 'sync':
|
|
|
|
|
value = self.clVars.GetBool('cl_update_binhost_stable_set')
|
|
|
|
|
new_value = self.clVars.GetBool('cl_update_binhost_stable_opt_set')
|
|
|
|
|