Updated for mirror

This commit is contained in:
Dimitris Zlatanidis 2023-03-30 10:00:37 +03:00
parent 276f26e21a
commit 11f0b36927

View file

@ -216,17 +216,12 @@ class InstallData(Configs):
cache.append(split_package[0]) # package name cache.append(split_package[0]) # package name
cache.append(split_package[1]) # package version cache.append(split_package[1]) # package version
cache.append(package_name) cache.append(package_name)
cache.append(self.repos.gnome_repo_mirror)
try: try:
cache.append(checksums_dict[package_name]) cache.append(checksums_dict[package_name])
except KeyError: except KeyError:
cache.append('error checksum') cache.append('error checksum')
if line.startswith(pkg_tag[1]):
package_mirror = line.replace(pkg_tag[1], '').strip()
if not package_mirror.endswith('/'):
package_mirror: str = f'{package_mirror}/'
cache.append(package_mirror)
if line.startswith(pkg_tag[2]): if line.startswith(pkg_tag[2]):
package_location = line.replace(pkg_tag[2], '').strip() package_location = line.replace(pkg_tag[2], '').strip()
cache.append(package_location[1:]) # Do not install (.) dot cache.append(package_location[1:]) # Do not install (.) dot
@ -249,8 +244,8 @@ class InstallData(Configs):
name=cache[0], name=cache[0],
version=cache[1], version=cache[1],
package=cache[2], package=cache[2],
checksum=cache[3], mirror=cache[3],
mirror=cache[4], checksum=cache[4],
location=cache[5], location=cache[5],
size_comp=cache[6], size_comp=cache[6],
size_uncomp=cache[7], size_uncomp=cache[7],
@ -307,17 +302,12 @@ class InstallData(Configs):
cache.append(split_package[0]) # package name cache.append(split_package[0]) # package name
cache.append(split_package[1]) # package version cache.append(split_package[1]) # package version
cache.append(package_name) cache.append(package_name)
cache.append(self.repos.conraid_repo_mirror)
try: try:
cache.append(checksums_dict[package_name]) cache.append(checksums_dict[package_name])
except KeyError: except KeyError:
cache.append('error checksum') cache.append('error checksum')
if line.startswith(pkg_tag[1]):
package_mirror: str = line.replace(pkg_tag[1], '').strip()
if not package_mirror.endswith('/'):
package_mirror: str = f'{package_mirror}/'
cache.append(package_mirror)
if line.startswith(pkg_tag[2]): if line.startswith(pkg_tag[2]):
package_location: str = line.replace(pkg_tag[2], '').strip() package_location: str = line.replace(pkg_tag[2], '').strip()
cache.append(package_location[2:]) # Do not install (./) dot cache.append(package_location[2:]) # Do not install (./) dot
@ -340,8 +330,8 @@ class InstallData(Configs):
name=cache[0], name=cache[0],
version=cache[1], version=cache[1],
package=cache[2], package=cache[2],
checksum=cache[3], mirror=cache[3],
mirror=cache[4], checksum=cache[4],
location=cache[5], location=cache[5],
size_comp=cache[6], size_comp=cache[6],
size_uncomp=cache[7], size_uncomp=cache[7],