diff options
author | Aditya R <arajan@redhat.com> | 2022-05-23 15:25:34 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-05-26 10:50:21 +0530 |
commit | b730e7328e9fd1142d84e4a7c4fe213a7aa6d5d9 (patch) | |
tree | 39dbf6242fb922a689a9791a4d29529924298cf0 | |
parent | acdfb4d14f15814a1178985cce7175eaa13acd6a (diff) | |
download | podman-b730e7328e9fd1142d84e4a7c4fe213a7aa6d5d9.tar.gz podman-b730e7328e9fd1142d84e4a7c4fe213a7aa6d5d9.tar.bz2 podman-b730e7328e9fd1142d84e4a7c4fe213a7aa6d5d9.zip |
cmd, build: remove redundant squash processing logic
Same block contains similar lines above this is not needed as this looks
redundant.
[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]
Signed-off-by: Aditya R <arajan@redhat.com>
-rw-r--r-- | cmd/podman/images/build.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 3ea60e18a..36779d6bc 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -442,22 +442,6 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil return nil, err } - // `buildah bud --layers=false` acts like `docker build --squash` does. - // That is all of the new layers created during the build process are - // condensed into one, any layers present prior to this build are retained - // without condensing. `buildah bud --squash` squashes both new and old - // layers down into one. Translate Podman commands into Buildah. - // Squash invoked, retain old layers, squash new layers into one. - if c.Flags().Changed("squash") && flags.Squash { - flags.Squash = false - flags.Layers = false - } - // Squash-all invoked, squash both new and old layers into one. - if c.Flags().Changed("squash-all") { - flags.Squash = true - flags.Layers = false - } - compression := buildahDefine.Gzip if flags.DisableCompression { compression = buildahDefine.Uncompressed |