mirror of
https://github.com/Jguer/yay
synced 2024-10-05 23:59:13 +00:00
Fix redownload logic
--redownload was reversed and redownloaded the deps instead of the targets.
This commit is contained in:
parent
bbeaf5bc6e
commit
2b6a73041f
16
install.go
16
install.go
|
@ -796,14 +796,16 @@ func pkgbuildsToSkip(bases []Base, targets stringSet) stringSet {
|
|||
isTarget = isTarget || targets.get(pkg.Name)
|
||||
}
|
||||
|
||||
if config.ReDownload == "no" || (config.ReDownload == "yes" && isTarget) {
|
||||
dir := filepath.Join(config.BuildDir, base.Pkgbase(), ".SRCINFO")
|
||||
pkgbuild, err := gosrc.ParseFile(dir)
|
||||
if (config.ReDownload == "yes" && isTarget) || config.ReDownload == "all" {
|
||||
continue
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
if alpm.VerCmp(pkgbuild.Version(), base.Version()) >= 0 {
|
||||
toSkip.set(base.Pkgbase())
|
||||
}
|
||||
dir := filepath.Join(config.BuildDir, base.Pkgbase(), ".SRCINFO")
|
||||
pkgbuild, err := gosrc.ParseFile(dir)
|
||||
|
||||
if err == nil {
|
||||
if alpm.VerCmp(pkgbuild.Version(), base.Version()) >= 0 {
|
||||
toSkip.set(base.Pkgbase())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue