@@ -18,11 +18,11 @@ import (
1818 "strings"
1919
2020 "github.com/containers/buildah/define"
21- "github.com/containers/image/v5/types"
21+ imageTypes "github.com/containers/image/v5/types"
2222 ldefine "github.com/containers/podman/v4/libpod/define"
2323 "github.com/containers/podman/v4/pkg/auth"
2424 "github.com/containers/podman/v4/pkg/bindings"
25- "github.com/containers/podman/v4/pkg/domain/entities"
25+ "github.com/containers/podman/v4/pkg/domain/entities/types "
2626 "github.com/containers/podman/v4/pkg/util"
2727 "github.com/containers/storage/pkg/fileutils"
2828 "github.com/containers/storage/pkg/ioutils"
@@ -50,7 +50,7 @@ type BuildResponse struct {
5050}
5151
5252// Build creates an image using a containerfile reference
53- func Build (ctx context.Context , containerFiles []string , options entities .BuildOptions ) (* entities .BuildReport , error ) {
53+ func Build (ctx context.Context , containerFiles []string , options types .BuildOptions ) (* types .BuildReport , error ) {
5454 if options .CommonBuildOpts == nil {
5555 options .CommonBuildOpts = new (define.CommonBuildOptions )
5656 }
@@ -255,9 +255,9 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
255255 }
256256
257257 switch options .SkipUnusedStages {
258- case types .OptionalBoolTrue :
258+ case imageTypes .OptionalBoolTrue :
259259 params .Set ("skipunusedstages" , "1" )
260- case types .OptionalBoolFalse :
260+ case imageTypes .OptionalBoolFalse :
261261 params .Set ("skipunusedstages" , "0" )
262262 }
263263
@@ -342,9 +342,9 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
342342 params .Set ("pullpolicy" , options .PullPolicy .String ())
343343
344344 switch options .CommonBuildOpts .IdentityLabel {
345- case types .OptionalBoolTrue :
345+ case imageTypes .OptionalBoolTrue :
346346 params .Set ("identitylabel" , "1" )
347- case types .OptionalBoolFalse :
347+ case imageTypes .OptionalBoolFalse :
348348 params .Set ("identitylabel" , "0" )
349349 }
350350 if options .Quiet {
@@ -416,7 +416,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
416416 } else {
417417 headers , err = auth .MakeXRegistryConfigHeader (options .SystemContext , "" , "" )
418418 }
419- if options .SystemContext .DockerInsecureSkipTLSVerify == types .OptionalBoolTrue {
419+ if options .SystemContext .DockerInsecureSkipTLSVerify == imageTypes .OptionalBoolTrue {
420420 params .Set ("tlsVerify" , "false" )
421421 }
422422 }
@@ -618,7 +618,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
618618 // even when the server quit but it seems desirable to
619619 // distinguish a proper build from a transient EOF.
620620 case <- response .Request .Context ().Done ():
621- return & entities .BuildReport {ID : id , SaveFormat : saveFormat }, nil
621+ return & types .BuildReport {ID : id , SaveFormat : saveFormat }, nil
622622 default :
623623 // non-blocking select
624624 }
@@ -632,7 +632,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
632632 if errors .Is (err , io .EOF ) && id != "" {
633633 break
634634 }
635- return & entities .BuildReport {ID : id , SaveFormat : saveFormat }, fmt .Errorf ("decoding stream: %w" , err )
635+ return & types .BuildReport {ID : id , SaveFormat : saveFormat }, fmt .Errorf ("decoding stream: %w" , err )
636636 }
637637
638638 switch {
@@ -645,12 +645,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
645645 case s .Error != nil :
646646 // If there's an error, return directly. The stream
647647 // will be closed on return.
648- return & entities .BuildReport {ID : id , SaveFormat : saveFormat }, errors .New (s .Error .Message )
648+ return & types .BuildReport {ID : id , SaveFormat : saveFormat }, errors .New (s .Error .Message )
649649 default :
650- return & entities .BuildReport {ID : id , SaveFormat : saveFormat }, errors .New ("failed to parse build results stream, unexpected input" )
650+ return & types .BuildReport {ID : id , SaveFormat : saveFormat }, errors .New ("failed to parse build results stream, unexpected input" )
651651 }
652652 }
653- return & entities .BuildReport {ID : id , SaveFormat : saveFormat }, nil
653+ return & types .BuildReport {ID : id , SaveFormat : saveFormat }, nil
654654}
655655
656656func nTar (excludes []string , sources ... string ) (io.ReadCloser , error ) {
0 commit comments