isula-build: sync upstream patch
Signed-off-by: DCCooper <1866858@gmail.com>
This commit is contained in:
parent
2fcfbd8fef
commit
08770c2029
@ -1 +1 @@
|
|||||||
0.9.5-7
|
0.9.5-8
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
2a48f637ab271e57f8f1daf9e753766b7ed98bd7
|
e94aba5277b21e40c4120b9e847a74575e63fed7
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: isula-build
|
Name: isula-build
|
||||||
Version: 0.9.5
|
Version: 0.9.5
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: A tool to build container images
|
Summary: A tool to build container images
|
||||||
License: Mulan PSL V2
|
License: Mulan PSL V2
|
||||||
URL: https://gitee.com/openeuler/isula-build
|
URL: https://gitee.com/openeuler/isula-build
|
||||||
@ -85,6 +85,12 @@ fi
|
|||||||
/usr/share/bash-completion/completions/isula-build
|
/usr/share/bash-completion/completions/isula-build
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 16 2021 DCCooper <1866858@gmail.com> - 0.9.5-8
|
||||||
|
- Type:enhancement
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:sync patch from upstream
|
||||||
|
|
||||||
* Wed Jun 02 2021 DCCooper <1866858@gmail.com> - 0.9.5-7
|
* Wed Jun 02 2021 DCCooper <1866858@gmail.com> - 0.9.5-7
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
@ -0,0 +1,86 @@
|
|||||||
|
From 80422e04f262f925458e7cee6986edb0903cef71 Mon Sep 17 00:00:00 2001
|
||||||
|
From: DCCooper <1866858@gmail.com>
|
||||||
|
Date: Tue, 15 Jun 2021 20:01:25 +0800
|
||||||
|
Subject: [PATCH] isula-build:cleancode for errors.Wrap function
|
||||||
|
|
||||||
|
Signed-off-by: DCCooper <1866858@gmail.com>
|
||||||
|
---
|
||||||
|
cmd/cli/grpc_client.go | 2 +-
|
||||||
|
daemon/load.go | 2 +-
|
||||||
|
exporter/common.go | 2 +-
|
||||||
|
image/image.go | 6 +++---
|
||||||
|
4 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmd/cli/grpc_client.go b/cmd/cli/grpc_client.go
|
||||||
|
index 5f10fb0..cab5950 100644
|
||||||
|
--- a/cmd/cli/grpc_client.go
|
||||||
|
+++ b/cmd/cli/grpc_client.go
|
||||||
|
@@ -82,7 +82,7 @@ func NewClient(ctx context.Context) (*GrpcClient, error) {
|
||||||
|
defer cancel()
|
||||||
|
connected, err := cli.HealthCheck(healthCtx)
|
||||||
|
if !connected || err != nil {
|
||||||
|
- return nil, errors.Wrapf(err, "Cannot connect to the isula-builder at %s. Is the isula-builder running?\nError", constant.DefaultGRPCAddress)
|
||||||
|
+ return nil, errors.Errorf( "Cannot connect to the isula-builder at %s. Is the isula-builder running?\nError: %v", constant.DefaultGRPCAddress, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cli, nil
|
||||||
|
diff --git a/daemon/load.go b/daemon/load.go
|
||||||
|
index f2d818f..2fb8e27 100644
|
||||||
|
--- a/daemon/load.go
|
||||||
|
+++ b/daemon/load.go
|
||||||
|
@@ -154,7 +154,7 @@ func getDockerRepoTagFromImageTar(systemContext *types.SystemContext, path strin
|
||||||
|
|
||||||
|
topLevelImageManifest, err := tarfileSource.LoadTarManifest()
|
||||||
|
if err != nil || len(topLevelImageManifest) == 0 {
|
||||||
|
- return nil, errors.Wrapf(err, "failed to get the top level image manifest")
|
||||||
|
+ return nil, errors.Errorf("failed to get the top level image manifest: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var allRepoTags [][]string
|
||||||
|
diff --git a/exporter/common.go b/exporter/common.go
|
||||||
|
index bded6ec..cd976d2 100644
|
||||||
|
--- a/exporter/common.go
|
||||||
|
+++ b/exporter/common.go
|
||||||
|
@@ -132,7 +132,7 @@ func export(e Exporter, exOpts ExportOptions) (reference.Canonical, digest.Diges
|
||||||
|
|
||||||
|
destRef, srcRef := e.GetDestRef(exOpts.ExportID), e.GetSrcRef(exOpts.ExportID)
|
||||||
|
if destRef == nil || srcRef == nil {
|
||||||
|
- return nil, "", errors.Wrapf(err, "get dest or src reference by export ID %v failed", exOpts.ExportID)
|
||||||
|
+ return nil, "", errors.Errorf("get dest or src reference by export ID %v failed %v", exOpts.ExportID, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if manifestBytes, err = cp.Image(exOpts.Ctx, policyContext, destRef, srcRef, cpOpts); err != nil {
|
||||||
|
diff --git a/image/image.go b/image/image.go
|
||||||
|
index 91ab720..e06d253 100644
|
||||||
|
--- a/image/image.go
|
||||||
|
+++ b/image/image.go
|
||||||
|
@@ -314,7 +314,7 @@ func createImageV2Image(ctx context.Context, fromImage types.Image, targetMIMETy
|
||||||
|
ManifestMIMEType: targetMIMEType,
|
||||||
|
})
|
||||||
|
if err2 != nil {
|
||||||
|
- return nil, errors.Wrapf(err, "failed to convert image %q", imageName)
|
||||||
|
+ return nil, errors.Wrapf(err2, "failed to convert image %q", imageName)
|
||||||
|
}
|
||||||
|
fromImage = updatedImg
|
||||||
|
}
|
||||||
|
@@ -533,7 +533,7 @@ func ParseImagesToReference(store *store.Store, names []string) (types.ImageRefe
|
||||||
|
// For support export archive file, we need provide reference.Named field when names is the format of name[:tag] not the image ID
|
||||||
|
pRef, pErr := reference.Parse(name)
|
||||||
|
if pErr != nil {
|
||||||
|
- return nil, nil, errors.Wrapf(err, "error parse name %q", name)
|
||||||
|
+ return nil, nil, errors.Wrapf(pErr, "error parse name %q", name)
|
||||||
|
}
|
||||||
|
namedRef, isNamed := pRef.(reference.Named)
|
||||||
|
if !isNamed {
|
||||||
|
@@ -543,7 +543,7 @@ func ParseImagesToReference(store *store.Store, names []string) (types.ImageRefe
|
||||||
|
var nErr error
|
||||||
|
ref, nErr = is.Transport.NewStoreReference(store, namedRef, img2.ID)
|
||||||
|
if nErr != nil {
|
||||||
|
- return nil, nil, errors.Wrap(err, "error get reference from store")
|
||||||
|
+ return nil, nil, errors.Wrap(nErr, "error get reference from store")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -17,3 +17,4 @@ patch/0050-data-and-run-root-set-unit-test.patch
|
|||||||
patch/0051-bugfix-set-user-s-uid-and-gid-for-containers.patch
|
patch/0051-bugfix-set-user-s-uid-and-gid-for-containers.patch
|
||||||
patch/0052-hack-make-isula-build-binary-static.patch
|
patch/0052-hack-make-isula-build-binary-static.patch
|
||||||
patch/0053-integration-test-from-new-flaw-of-run-and-data-root-.patch
|
patch/0053-integration-test-from-new-flaw-of-run-and-data-root-.patch
|
||||||
|
patch/0054-isula-build-cleancode-for-errors.Wrap-function.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user