Skip to content

Commit

Permalink
fix(installer): Fixes the same pkgbase being built multiple times on …
Browse files Browse the repository at this point in the history
…error

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 2659e01
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/sync/build/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func (installer *Installer) installAURPackages(ctx context.Context,
installer.log.Debugln("building pkgbase", base, "package", name)
pkgdests, errMake = installer.buildPkg(ctx, dir, base,
installIncompatible, cmdArgs.ExistsArg("needed"), aurOrigTargetBases.Contains(base))
builtPkgDests[base] = pkgdests
if errMake != nil {
if !lastLayer {
return fmt.Errorf("%s - %w", gotext.Get("error making: %s", base), errMake)
Expand All @@ -249,8 +250,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 2659e01

Please sign in to comment.