Skip to content

Commit

Permalink
Packaging: Update packaging dependency.
Browse files Browse the repository at this point in the history
The following brings in the new juju/packaging dependency. The updated
library allows for better retries for apt, yum, zypper and snap. With
the latter working as previously it never did before hand. Zypper
doesn't allow retries at the moment, because there aren't any retry
codes that we can use from the zypper CLI.
  • Loading branch information
SimonRichardson committed Jun 22, 2021
1 parent 51def44 commit 6e10335
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions cloudconfig/cloudinit/cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"

jujupackaging "github.com/juju/juju/packaging"
"github.com/juju/packaging/commands"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2/commands"
"github.com/juju/packaging/v2/config"
"github.com/juju/utils/v2/shell"
"github.com/juju/utils/v2/ssh"
)
Expand Down
4 changes: 2 additions & 2 deletions cloudconfig/cloudinit/cloudinit_centos.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

corenetwork "github.com/juju/juju/core/network"
jujupackaging "github.com/juju/juju/packaging"
"github.com/juju/packaging"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2"
"github.com/juju/packaging/v2/config"
"gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/cloudinit/cloudinit_opensuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package cloudinit

import (
"github.com/juju/packaging/commands"
"github.com/juju/packaging/v2/commands"
"github.com/juju/proxy"
)

Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/cloudinit/cloudinit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package cloudinit_test
import (
"fmt"

"github.com/juju/packaging"
"github.com/juju/packaging/v2"
jc "github.com/juju/testing/checkers"
sshtesting "github.com/juju/utils/v2/ssh/testing"
gc "gopkg.in/check.v1"
Expand Down
4 changes: 2 additions & 2 deletions cloudconfig/cloudinit/cloudinit_ubuntu.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/juju/errors"
"github.com/juju/juju/core/snap"
jujupackaging "github.com/juju/juju/packaging"
"github.com/juju/packaging"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2"
"github.com/juju/packaging/v2/config"
"github.com/juju/proxy"
"github.com/juju/utils/v2"
"gopkg.in/yaml.v2"
Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/cloudinit/cloudinit_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cloudinit

import (
corenetwork "github.com/juju/juju/core/network"
"github.com/juju/packaging"
"github.com/juju/packaging/v2"
)

// windowsCloudConfig is the cloudconfig type specific to Windows machines.
Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/cloudinit/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package cloudinit
import (
"strings"

"github.com/juju/packaging/config"
"github.com/juju/packaging/v2/config"
)

// addPackageCommandsCommon is a helper function which applies the given
Expand Down
6 changes: 3 additions & 3 deletions cloudconfig/cloudinit/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/juju/errors"
corenetwork "github.com/juju/juju/core/network"
jujupackaging "github.com/juju/juju/packaging"
"github.com/juju/packaging"
"github.com/juju/packaging/commands"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2"
"github.com/juju/packaging/v2/commands"
"github.com/juju/packaging/v2/config"
"github.com/juju/proxy"
"github.com/juju/utils/v2/shell"

Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/cloudinit/renderscript_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cloudinit_test
import (
"regexp"

"github.com/juju/packaging"
"github.com/juju/packaging/v2"
jc "github.com/juju/testing/checkers"
"github.com/juju/version/v2"
gc "gopkg.in/check.v1"
Expand Down
4 changes: 2 additions & 2 deletions cloudconfig/cloudinit/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"path/filepath"

jujupackaging "github.com/juju/juju/packaging"
"github.com/juju/packaging"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2"
"github.com/juju/packaging/v2/config"
"github.com/juju/utils/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/userdatacfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
coreseries "github.com/juju/juju/core/series"
"github.com/juju/loggo"
"github.com/juju/names/v4"
pacconf "github.com/juju/packaging/config"
pacconf "github.com/juju/packaging/v2/config"
"github.com/juju/proxy"
jc "github.com/juju/testing/checkers"
"github.com/juju/version/v2"
Expand Down
2 changes: 1 addition & 1 deletion container/lxd/initialisation_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/os/v2/series"
"github.com/juju/packaging/manager"
"github.com/juju/packaging/v2/manager"
"github.com/juju/proxy"
"github.com/lxc/lxd/shared"

Expand Down
4 changes: 2 additions & 2 deletions container/lxd/initialisation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"runtime"

"github.com/golang/mock/gomock"
"github.com/juju/packaging/commands"
"github.com/juju/packaging/manager"
"github.com/juju/packaging/v2/commands"
"github.com/juju/packaging/v2/manager"
"github.com/juju/proxy"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
Expand Down
2 changes: 1 addition & 1 deletion featuretests/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/juju/cmd/cmdtesting"
"github.com/juju/errors"
"github.com/juju/names/v4"
pacman "github.com/juju/packaging/manager"
pacman "github.com/juju/packaging/v2/manager"
jc "github.com/juju/testing/checkers"
"github.com/juju/version/v2"
gc "gopkg.in/check.v1"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ require (
github.com/juju/names/v4 v4.0.0-20200929085019-be23e191fee0
github.com/juju/naturalsort v0.0.0-20180423034842-5b81707e882b
github.com/juju/os/v2 v2.1.2
github.com/juju/packaging v0.0.0-20210602012220-a1d8f0c5acd9
github.com/juju/packaging/v2 v2.0.0-20210622141625-c7a51bd50843
github.com/juju/persistent-cookiejar v0.0.0-20170428161559-d67418f14c93
github.com/juju/proxy v0.0.0-20180523025733-5f8741c297b4
github.com/juju/pubsub v0.0.0-20190419131051-c1f7536b9cc6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ github.com/juju/os v0.0.0-20191022170002-da411304426c/go.mod h1:buR1fIbfLx3neIA/
github.com/juju/os/v2 v2.0.0/go.mod h1:S/AadPYIeAZtep7zu519c+eWGWV7dVR+Hb8RTGBR1+I=
github.com/juju/os/v2 v2.1.2 h1:RZ1mRJ/fx6O6KpLBLaNwMbb+EMI+iEfBPTdb3CWpi7w=
github.com/juju/os/v2 v2.1.2/go.mod h1:S/AadPYIeAZtep7zu519c+eWGWV7dVR+Hb8RTGBR1+I=
github.com/juju/packaging v0.0.0-20210602012220-a1d8f0c5acd9 h1:TJsa3p04K4RhtTZ91qADfuJmQ2zstEMQWxauR4SW30M=
github.com/juju/packaging v0.0.0-20210602012220-a1d8f0c5acd9/go.mod h1:IMNHG1GegM098IwRypW5SFXF3ZSK08mGwQhDWz4AZ1g=
github.com/juju/packaging/v2 v2.0.0-20210622141625-c7a51bd50843 h1:jyAlb5SVhAeCoH3DkWFA6QvjNgh3ifVwlJkllp9khE0=
github.com/juju/packaging/v2 v2.0.0-20210622141625-c7a51bd50843/go.mod h1:QkkuIt0as7ewiNyrDrr1MyyRm3TVrabyMsLQdr97Sx8=
github.com/juju/persistent-cookiejar v0.0.0-20170428161559-d67418f14c93 h1:nlmpG1/Pv5elsi69wXhLkBhefGPE19bOCJ/xVwovl7A=
github.com/juju/persistent-cookiejar v0.0.0-20170428161559-d67418f14c93/go.mod h1:zrbmo4nBKaiP/Ez3F67ewkMbzGYfXyMvRtbOfuAwG0w=
github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM=
Expand Down
4 changes: 2 additions & 2 deletions packaging/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/packaging/config"
"github.com/juju/packaging/manager"
"github.com/juju/packaging/v2/config"
"github.com/juju/packaging/v2/manager"
)

var logger = loggo.GetLogger("juju.packaging")
Expand Down
2 changes: 1 addition & 1 deletion upgrades/preupgradesteps.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package upgrades
import (
"github.com/dustin/go-humanize"
"github.com/juju/errors"
"github.com/juju/packaging/manager"
"github.com/juju/packaging/v2/manager"
"github.com/juju/utils/v2/du"

"github.com/juju/juju/agent"
Expand Down
2 changes: 1 addition & 1 deletion upgrades/preupgradesteps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os/exec"

"github.com/dustin/go-humanize"
pkgmgr "github.com/juju/packaging/manager"
pkgmgr "github.com/juju/packaging/v2/manager"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"

Expand Down
4 changes: 2 additions & 2 deletions worker/proxyupdater/proxyupdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/juju/errors"
"github.com/juju/os/v2/series"
"github.com/juju/packaging/commands"
"github.com/juju/packaging/config"
"github.com/juju/packaging/v2/commands"
"github.com/juju/packaging/v2/config"
"github.com/juju/proxy"
"github.com/juju/utils/v2/exec"
"github.com/juju/worker/v2"
Expand Down
4 changes: 2 additions & 2 deletions worker/proxyupdater/proxyupdater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/juju/errors"
"github.com/juju/loggo"
jujuos "github.com/juju/os/v2"
"github.com/juju/packaging/commands"
pacconfig "github.com/juju/packaging/config"
"github.com/juju/packaging/v2/commands"
pacconfig "github.com/juju/packaging/v2/config"
"github.com/juju/proxy"
jc "github.com/juju/testing/checkers"
"github.com/juju/worker/v2"
Expand Down

0 comments on commit 6e10335

Please sign in to comment.