Remove mistaken code that got merged in other PR
Miloslav had some good comments on a previous commit. https://github.com/containers/buildah/pull/1411 These changes address his issues by removing them. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1412 Approved by: mtrmac
This commit is contained in:
parent
d0f8515470
commit
1ba9201f38
|
@ -183,11 +183,6 @@ func budCmd(c *cobra.Command, inputArgs []string, iopts budResults) error {
|
|||
if err != nil {
|
||||
return errors.Wrapf(err, "error building system context")
|
||||
}
|
||||
if iopts.BlobCache != "" {
|
||||
systemContext.BlobInfoCacheDir = iopts.BlobCache
|
||||
} else {
|
||||
systemContext.BlobInfoCacheDir = filepath.Join(store.GraphRoot(), "cache")
|
||||
}
|
||||
|
||||
isolation, err := parse.IsolationOption(c)
|
||||
if err != nil {
|
||||
|
|
|
@ -269,7 +269,6 @@ func Push(ctx context.Context, image string, dest types.ImageReference, options
|
|||
if err != nil {
|
||||
return nil, "", errors.Wrapf(err, "error wrapping image reference %q in blob cache at %q", transports.ImageName(src), options.BlobDirectory)
|
||||
}
|
||||
systemContext.BlobInfoCacheDir = options.BlobDirectory
|
||||
maybeCachedSrc = cache
|
||||
}
|
||||
// Copy everything.
|
||||
|
|
6
new.go
6
new.go
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/buildah/util"
|
||||
|
@ -246,11 +245,6 @@ func newBuilder(ctx context.Context, store storage.Store, options BuilderOptions
|
|||
}
|
||||
|
||||
systemContext := getSystemContext(store, options.SystemContext, options.SignaturePolicyPath)
|
||||
if options.BlobDirectory != "" {
|
||||
systemContext.BlobInfoCacheDir = options.BlobDirectory
|
||||
} else {
|
||||
systemContext.BlobInfoCacheDir = filepath.Join(store.GraphRoot(), "cache")
|
||||
}
|
||||
|
||||
if options.FromImage != "" && options.FromImage != "scratch" {
|
||||
ref, _, img, err = resolveImage(ctx, systemContext, store, options)
|
||||
|
|
8
pull.go
8
pull.go
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
|
||||
"strings"
|
||||
|
||||
|
@ -164,13 +163,6 @@ func Pull(ctx context.Context, imageName string, options PullOptions) error {
|
|||
BlobDirectory: options.BlobDirectory,
|
||||
ReportWriter: options.ReportWriter,
|
||||
}
|
||||
if options.BlobDirectory != "" {
|
||||
systemContext.BlobInfoCacheDir = options.BlobDirectory
|
||||
} else {
|
||||
if systemContext.BlobInfoCacheDir != "" {
|
||||
systemContext.BlobInfoCacheDir = filepath.Join(options.Store.GraphRoot(), "cache")
|
||||
}
|
||||
}
|
||||
|
||||
storageRef, transport, img, err := resolveImage(ctx, systemContext, options.Store, boptions)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue