Skip to content

Commit

Permalink
fix(installer): Fix the same pkgbase being built multiple times on error
Browse files Browse the repository at this point in the history
The previous fix commit ec837c8 failed to address the case where the
build fails, as packages are only added to builtPkgDests on a successful
build. This commit addresses this by adding the package to the map earlier.

Fixes Jguer#2560.
  • Loading branch information
Ferdi265 committed Jan 5, 2025
1 parent 9322197 commit 7c152e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sync/build/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ func (installer *Installer) installAURPackages(ctx context.Context,
} else {
var errMake error
installer.log.Debugln("building pkgbase", base, "package", name)
builtPkgDests[base] = pkgdests

pkgdests, errMake = installer.buildPkg(ctx, dir, base,
installIncompatible, cmdArgs.ExistsArg("needed"), aurOrigTargetBases.Contains(base))
if errMake != nil {
Expand All @@ -249,8 +251,6 @@ func (installer *Installer) installAURPackages(ctx context.Context,
installer.log.Errorln(gotext.Get("error making: %s", base), "-", errMake)
continue
}

builtPkgDests[base] = pkgdests
}

if len(pkgdests) == 0 {
Expand Down

0 comments on commit 7c152e3

Please sign in to comment.