diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-03-15 12:55:06 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-03-15 14:02:04 +0100 |
commit | 57e8c66322849ff60e6126616c0c9883a80fb139 (patch) | |
tree | dc91b324d82675d66c6b1f37d6ca97c82597ae30 /pkg/autoupdate | |
parent | 762148deb6be6925d17bd12f219f7385e1402439 (diff) | |
download | podman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.gz podman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.bz2 podman-57e8c66322849ff60e6126616c0c9883a80fb139.zip |
Do not leak libpod package into the remote client
Some packages used by the remote client imported the libpod package.
This is not wanted because it adds unnecessary bloat to the client and
also causes problems with platform specific code(linux only), see #9710.
The solution is to move the used functions/variables into extra packages
which do not import libpod.
This change shrinks the remote client size more than 6MB compared to the
current master.
[NO TESTS NEEDED]
I have no idea how to test this properly but with #9710 the cross
compile should fail.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/autoupdate')
-rw-r--r-- | pkg/autoupdate/autoupdate.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index 53095c295..e271b9466 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -13,7 +13,7 @@ import ( "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/libpod/image" "github.com/containers/podman/v3/pkg/systemd" - systemdGen "github.com/containers/podman/v3/pkg/systemd/generate" + systemdDefine "github.com/containers/podman/v3/pkg/systemd/define" "github.com/containers/podman/v3/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -178,10 +178,10 @@ func AutoUpdate(runtime *libpod.Runtime, options Options) ([]string, []error) { updatedUnits := []string{} for _, ctr := range containersToRestart { labels := ctr.Labels() - unit, exists := labels[systemdGen.EnvVariable] + unit, exists := labels[systemdDefine.EnvVariable] if !exists { // Shouldn't happen but let's be sure of it. - errs = append(errs, errors.Errorf("error auto-updating container %q: no %s label found", ctr.ID(), systemdGen.EnvVariable)) + errs = append(errs, errors.Errorf("error auto-updating container %q: no %s label found", ctr.ID(), systemdDefine.EnvVariable)) continue } _, err := conn.RestartUnit(unit, "replace", nil) |