1
0

feat: check for mirrored packages

This commit is contained in:
2023-05-15 13:07:56 +00:00
parent e1ac75d0fa
commit d118ab03c3
2 changed files with 35 additions and 0 deletions

View File

@ -421,6 +421,15 @@ func installKernel(sk config.KernelMask, pkgname string, force, headers bool) (e
}
for _, pkg := range pkgs {
found, newurl := cache.PackageURL(
sk.DistroType,
pkg.Deb.URL,
)
if found {
log.Debug().Msgf("cached deb found %s", newurl)
pkg.Deb.URL = newurl
}
cmd += fmt.Sprintf(" && wget --no-check-certificate %s",
strings.Replace(pkg.Deb.URL, "https", "http", -1))
}