isula-build:sync upstream to fix random sequence for saving separated image tarball
Signed-off-by: DCCooper <1866858@gmail.com>
This commit is contained in:
parent
457a94ce2b
commit
030edc55ba
@ -1 +1 @@
|
||||
0.9.5-15
|
||||
0.9.5-16
|
||||
|
||||
@ -1 +1 @@
|
||||
42f0c2f0f09f978ca9282ae085e68fa5446f231b
|
||||
3c9ff8702cdcd34e26af32c4ab6bcffc178cfaf5
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: isula-build
|
||||
Version: 0.9.5
|
||||
Release: 15
|
||||
Release: 16
|
||||
Summary: A tool to build container images
|
||||
License: Mulan PSL V2
|
||||
URL: https://gitee.com/openeuler/isula-build
|
||||
@ -85,6 +85,12 @@ fi
|
||||
/usr/share/bash-completion/completions/isula-build
|
||||
|
||||
%changelog
|
||||
* Wed Nov 03 2021 DCCooper <1866858@gmail.com> - 0.9.5-16
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:restart
|
||||
- DESC:fix random sequence for saving separated image tarball
|
||||
|
||||
* Tue Nov 02 2021 lixiang <lixiang172@huawei.com> - 0.9.5-15
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
From d6c302a3d5563286614c59a442f4cd65a8351ce2 Mon Sep 17 00:00:00 2001
|
||||
From: DCCooper <1866858@gmail.com>
|
||||
Date: Tue, 2 Nov 2021 20:54:24 +0800
|
||||
Subject: [PATCH 1/2] bugfix: fix random sequence for saving separated image
|
||||
tarball
|
||||
|
||||
reason: sort the map key and read the key in alohabetical orger
|
||||
|
||||
Signed-off-by: DCCooper <1866858@gmail.com>
|
||||
---
|
||||
daemon/save.go | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/daemon/save.go b/daemon/save.go
|
||||
index ecac5b6..9ad4e03 100644
|
||||
--- a/daemon/save.go
|
||||
+++ b/daemon/save.go
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
+ "sort"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
@@ -513,7 +514,13 @@ func (s *separatorSave) processImageLayers(imgInfos map[string]imageInfo) error
|
||||
libImagesMap = make(imageLayersMap, 1)
|
||||
appImagesMap = make(imageLayersMap, 1)
|
||||
)
|
||||
- for _, info := range imgInfos {
|
||||
+ var sortedKey []string
|
||||
+ for k := range imgInfos {
|
||||
+ sortedKey = append(sortedKey, k)
|
||||
+ }
|
||||
+ sort.Strings(sortedKey)
|
||||
+ for _, k := range sortedKey {
|
||||
+ info := imgInfos[k]
|
||||
if err := s.clearDirs(true); err != nil {
|
||||
return errors.Wrap(err, "clear tmp dirs failed")
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -48,3 +48,4 @@ patch/0082-test-optimize-scripts-in-hack.patch
|
||||
patch/0083-test-add-common-function-for-testing-separated-image.patch
|
||||
patch/0084-test-add-integration-tests-for-saving-and-loading-se.patch
|
||||
patch/0085-util-add-unit-test-for-increment-util-functions.patch
|
||||
patch/0086-bugfix-fix-random-sequence-for-saving-separated-imag.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user