improved debug logging in mirror check

master
Giovanni Harting 3 months ago
parent a97a4656a2
commit 2791ed44fa
  1. 5
      proto_package.go
  2. 2
      utils.go

@ -559,21 +559,22 @@ func (p *ProtoPackage) isAvailable(h *alpm.Handle) bool {
var pkg alpm.IPackage
if p.Srcinfo != nil {
pkg, err = dbs.FindSatisfier(p.Srcinfo.Packages[0].Pkgname)
log.Debugf("trying to find %s on mirror", p.Srcinfo.Packages[0].Pkgname)
} else {
pkg, err = dbs.FindSatisfier(p.DbPackage.Packages[0])
log.Debugf("trying to find %s on mirror", p.DbPackage.Packages[0])
}
buildManager.alpmMutex.Unlock()
if err != nil {
log.Debugf("error resolving %s: %v", p.Pkgbase, err)
return false
}
if pkg.DB().Name() != p.Repo.String() || pkg.Base() != p.Pkgbase {
log.Debugf("%s: repo (%s!=%s) or pkgbase (%s!=%s) does not match", p.Pkgbase, pkg.DB().Name(), p.Repo.String(), pkg.Base(), p.Pkgbase)
return false
}
if p.Srcinfo != nil && (p.Srcinfo.Arch[0] != pkg.Architecture() || p.Srcinfo.Pkgbase != pkg.Base()) {
log.Debugf("%s: arch (%s!=%s) or pkgbase (%s!=%s) does not match", p.Pkgbase, p.Srcinfo.Arch[0], pkg.Architecture(), pkg.Base(), p.Pkgbase)
return false
}

@ -615,7 +615,7 @@ func housekeeping(repo string, march string, wg *sync.WaitGroup) error {
pkg := &ProtoPackage{
Pkgbase: dbPkg.Pkgbase,
Repo: dbPkg.Repository,
FullRepo: string(dbPkg.Repository) + "-" + dbPkg.March,
FullRepo: dbPkg.Repository.String() + "-" + dbPkg.March,
DbPackage: dbPkg,
March: dbPkg.March,
}

Loading…
Cancel
Save