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