parent
cda014319a
commit
d365407441
|
@ -142,9 +142,11 @@ class UpdateListFilterCache(apt.Cache):
|
|||
for pkg in pkg_lists:
|
||||
try:
|
||||
new_ver = ver_in_allowed_origin(pkg, self.allowed_origins)
|
||||
if _is_adjust and not new_ver:
|
||||
if _is_adjust and len(new_ver) == 0:
|
||||
logging.warning("< %s > did not find a suitable version..." % pkg.name)
|
||||
continue
|
||||
if len(new_ver) == 0:
|
||||
continue
|
||||
if not pkg.installed: # 判断安装列表
|
||||
if pkg.candidate == new_ver[0] and pkg not in new_upgrade_pkgs:
|
||||
new_upgrade_pkgs.append(pkg)
|
||||
|
@ -264,11 +266,12 @@ class OriginProperty():
|
|||
http_origin['component'].append(item.split("/")[1])
|
||||
elif item not in ARCHITECTUREMAP and item != "Packages":
|
||||
http_origin['component'].append(item)
|
||||
for item in filter(not_empty, re.split(r'[,:\s]\s*', ls['release'])):
|
||||
if "release" not in ls['release']:
|
||||
break
|
||||
elif "=" in item:
|
||||
self.generate_dict(http_origin['release'], item)
|
||||
release_list = ls['release'].split(',')
|
||||
if "release " in release_list[0]:
|
||||
release_list[0] = release_list[0].lstrip("release ")
|
||||
for rl in release_list:
|
||||
if "=" in rl:
|
||||
self.generate_dict(http_origin['release'], rl)
|
||||
for item in filter(not_empty, ls['origin'].split(' ')):
|
||||
if "origin" not in ls['origin']:
|
||||
break
|
||||
|
@ -288,11 +291,12 @@ class OriginProperty():
|
|||
ftp_orgin['component'].append(item.split("/")[1])
|
||||
elif item not in ARCHITECTUREMAP and item != "Packages":
|
||||
ftp_orgin['component'].append(item)
|
||||
for item in filter(not_empty, re.split(r'[.,:\s]\s*', ls['release'])):
|
||||
if "release" not in ls['release']:
|
||||
break
|
||||
elif "=" in item:
|
||||
self.generate_dict(ftp_orgin['release'], item)
|
||||
release_list = ls['release'].split(',')
|
||||
if "release " in release_list[0]:
|
||||
release_list[0] = release_list[0].lstrip("release ")
|
||||
for rl in release_list:
|
||||
if "=" in rl:
|
||||
self.generate_dict(ftp_orgin['release'], rl)
|
||||
for item in filter(not_empty, ls['origin'].split(' ')):
|
||||
if "origin" not in ls['origin']:
|
||||
break
|
||||
|
|
|
@ -380,7 +380,7 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
return True,"success"
|
||||
|
||||
# # dbus接口:改变apt下载速度
|
||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb', out_signature='s')
|
||||
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb', out_signature='b')
|
||||
def SetDownloadspeedMax(self, speed, set):
|
||||
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' SetDownloadspeedMax, speed:%s, set:%r.'%(speed, set))
|
||||
self.parent.is_restart_aptdeamon = True
|
||||
|
|
Loading…
Reference in New Issue