mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
history: correctly set tags
Requires vendoring fixes from c/common and to update the transformation code. Also add a test to avoid future regressions. Fixes: #17763 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
8
vendor/github.com/containers/common/libimage/history.go
generated
vendored
8
vendor/github.com/containers/common/libimage/history.go
generated
vendored
@@ -51,7 +51,6 @@ func (i *Image) History(ctx context.Context) ([]ImageHistory, error) {
|
||||
}
|
||||
|
||||
if layer != nil {
|
||||
history.Tags = layer.Names
|
||||
if !ociImage.History[x].EmptyLayer {
|
||||
history.Size = layer.UncompressedSize
|
||||
}
|
||||
@@ -64,8 +63,13 @@ func (i *Image) History(ctx context.Context) ([]ImageHistory, error) {
|
||||
history.ID = id
|
||||
usedIDs[id] = true
|
||||
}
|
||||
for i := range node.images {
|
||||
history.Tags = append(history.Tags, node.images[i].Names()...)
|
||||
}
|
||||
}
|
||||
if layer.Parent != "" && !ociImage.History[x].EmptyLayer {
|
||||
if layer.Parent == "" {
|
||||
layer = nil
|
||||
} else if !ociImage.History[x].EmptyLayer {
|
||||
layer, err = i.runtime.store.Layer(layer.Parent)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go
generated
vendored
5
vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go
generated
vendored
@@ -8,14 +8,11 @@ import "golang.org/x/sys/unix"
|
||||
// numCPU queries the system for the count of threads available
|
||||
// for use to this process.
|
||||
//
|
||||
// Issues two syscalls.
|
||||
// Returns 0 on errors. Use |runtime.NumCPU| in that case.
|
||||
func numCPU() int {
|
||||
// Gets the affinity mask for a process: The very one invoking this function.
|
||||
pid := unix.Getpid()
|
||||
|
||||
var mask unix.CPUSet
|
||||
err := unix.SchedGetaffinity(pid, &mask)
|
||||
err := unix.SchedGetaffinity(0, &mask)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.53.0"
|
||||
const Version = "0.54.0-dev"
|
||||
|
||||
Reference in New Issue
Block a user