Skip to content

Commit

Permalink
Enforce "yes" when install debian packages in packaging (#33895) (#33897
Browse files Browse the repository at this point in the history
)

Older versions of Debian have expired GPG keys. In this case `-y` is
not enough and `apt-get` requires an additional `--force-yes`.

(cherry picked from commit 6c0dc97)

Co-authored-by: Denis <[email protected]>
  • Loading branch information
mergify[bot] and rdner authored Dec 1, 2022
1 parent 58f4643 commit 5930bf6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dev-tools/mage/pkgdeps.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"

"github.com/magefile/mage/sh"
"github.com/pkg/errors"
)

type PackageInstaller struct {
Expand Down Expand Up @@ -114,15 +113,15 @@ func installDependencies(arch string, pkgs ...string) error {
if arch != "" {
err := sh.Run("dpkg", "--add-architecture", arch)
if err != nil {
return errors.Wrap(err, "error while adding architecture")
return fmt.Errorf("error while adding architecture: %w", err)
}
}

if err := sh.Run("apt-get", "update"); err != nil {
return err
}

params := append([]string{"install", "-y",
params := append([]string{"install", "-y", "--force-yes",
"--no-install-recommends",

// Journalbeat is built with old versions of Debian that don't update
Expand Down

0 comments on commit 5930bf6

Please sign in to comment.