Skip to content

Commit

Permalink
Merge branch 'main' into vigneshraman/debos/issues/238
Browse files Browse the repository at this point in the history
  • Loading branch information
obbardc authored Aug 4, 2023
2 parents b66bdfd + 1ea5f88 commit b31bb00
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- debos-arch
- debos-bookworm
- debos-bullseye
- debos-trixie
runs-on: ubuntu-latest
defaults:
run:
Expand Down
20 changes: 18 additions & 2 deletions actions/apt_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ func NewAptAction() *AptAction {

func (apt *AptAction) Run(context *debos.DebosContext) error {
apt.LogStart()

aptConfig := []string{}

/* Don't show progress update percentages */
aptConfig = append(aptConfig, "-o=quiet::NoUpdate=1")

aptOptions := []string{"apt-get", "-y"}
aptOptions = append(aptOptions, aptConfig...)

if !apt.Recommends {
aptOptions = append(aptOptions, "--no-install-recommends")
Expand All @@ -62,7 +69,11 @@ func (apt *AptAction) Run(context *debos.DebosContext) error {
c.AddEnv("DEBIAN_FRONTEND=noninteractive")

if apt.Update {
err := c.Run("apt", "apt-get", "update")
cmd := []string{"apt-get"}
cmd = append(cmd, aptConfig...)
cmd = append(cmd, "update")

err := c.Run("apt", cmd...)
if err != nil {
return err
}
Expand All @@ -72,7 +83,12 @@ func (apt *AptAction) Run(context *debos.DebosContext) error {
if err != nil {
return err
}
err = c.Run("apt", "apt-get", "clean")

cmd := []string{"apt-get"}
cmd = append(cmd, aptConfig...)
cmd = append(cmd, "clean")

err = c.Run("apt", cmd...)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/docker/go-units v0.5.0
github.com/go-debos/fakemachine v0.0.4
github.com/go-debos/fakemachine v0.0.5
github.com/google/uuid v1.3.0
github.com/jessevdk/go-flags v1.5.0
github.com/sjoerdsimons/ostree-go v0.0.0-20201014091107-8fae757256f8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/go-debos/fakemachine v0.0.4 h1:XZIDHjovqXS0wO5XNGZn0grqdFB+IJzRl9oodv/OmQU=
github.com/go-debos/fakemachine v0.0.4/go.mod h1:b2FvxH5PpsHHDpfaXDglLD/r7kyIAp2JslxSxb0thUU=
github.com/go-debos/fakemachine v0.0.5 h1:+7g/5+0GXlANS1ZAW8khCaLEEZWZ/YjBUYeI4h2HBPw=
github.com/go-debos/fakemachine v0.0.5/go.mod h1:b2FvxH5PpsHHDpfaXDglLD/r7kyIAp2JslxSxb0thUU=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
Expand Down

0 comments on commit b31bb00

Please sign in to comment.