mirror of
https://github.com/containers/podman.git
synced 2025-06-25 03:52:15 +08:00
Merge pull request #20016 from flouthoc/test-rmi-wo-layer
test: rmi should work with images w/o layers
This commit is contained in:
2
go.mod
2
go.mod
@ -13,7 +13,7 @@ require (
|
|||||||
github.com/containernetworking/cni v1.1.2
|
github.com/containernetworking/cni v1.1.2
|
||||||
github.com/containernetworking/plugins v1.3.0
|
github.com/containernetworking/plugins v1.3.0
|
||||||
github.com/containers/buildah v1.32.0
|
github.com/containers/buildah v1.32.0
|
||||||
github.com/containers/common v0.56.0
|
github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282
|
||||||
github.com/containers/conmon v2.0.20+incompatible
|
github.com/containers/conmon v2.0.20+incompatible
|
||||||
github.com/containers/image/v5 v5.28.0
|
github.com/containers/image/v5 v5.28.0
|
||||||
github.com/containers/libhvee v0.4.1-0.20230905135638-56fb23533417
|
github.com/containers/libhvee v0.4.1-0.20230905135638-56fb23533417
|
||||||
|
4
go.sum
4
go.sum
@ -249,8 +249,8 @@ github.com/containernetworking/plugins v1.3.0 h1:QVNXMT6XloyMUoO2wUOqWTC1hWFV62Q
|
|||||||
github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0=
|
github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0=
|
||||||
github.com/containers/buildah v1.32.0 h1:uz5Rcf7lGeStj7iPTBgO4UdhQYZqMMzyt9suDf16k1k=
|
github.com/containers/buildah v1.32.0 h1:uz5Rcf7lGeStj7iPTBgO4UdhQYZqMMzyt9suDf16k1k=
|
||||||
github.com/containers/buildah v1.32.0/go.mod h1:sN3rA3DbnqekNz3bNdkqWduuirYDuMs54LUCOZOomBE=
|
github.com/containers/buildah v1.32.0/go.mod h1:sN3rA3DbnqekNz3bNdkqWduuirYDuMs54LUCOZOomBE=
|
||||||
github.com/containers/common v0.56.0 h1:hysHUsEai1EkMXanU26UV55wMXns/a6AYmaFqJ4fEMY=
|
github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282 h1:GkMoKMmH4EhjdCNk1jYGWC0pTa+SFdp6fas64nPOPyY=
|
||||||
github.com/containers/common v0.56.0/go.mod h1:IjaDdfUtcs2CfCcJMZxuut4XlvkTkY9Nlqkso9xCOq4=
|
github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282/go.mod h1:NKWo6OWVItRwJjqu30vd4uFG3bBKUL9q+B38GNwY/bo=
|
||||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||||
github.com/containers/image/v5 v5.28.0 h1:H4cWbdI88UA/mDb6SxMo3IxpmS1BSs/Kifvhwt9g048=
|
github.com/containers/image/v5 v5.28.0 h1:H4cWbdI88UA/mDb6SxMo3IxpmS1BSs/Kifvhwt9g048=
|
||||||
|
@ -122,7 +122,7 @@ EOF
|
|||||||
run_podman manifest create $manifestlocal
|
run_podman manifest create $manifestlocal
|
||||||
for arch in amd arm;do
|
for arch in amd arm;do
|
||||||
# FIXME: --layers=false needed to work around #19860
|
# FIXME: --layers=false needed to work around #19860
|
||||||
run_podman build --layers=false -t image_$arch --platform linux/${arch}64 -f $dockerfile
|
run_podman build -t image_$arch --platform linux/${arch}64 -f $dockerfile
|
||||||
run_podman manifest add $manifestlocal containers-storage:localhost/image_$arch:latest
|
run_podman manifest add $manifestlocal containers-storage:localhost/image_$arch:latest
|
||||||
done
|
done
|
||||||
|
|
||||||
|
22
vendor/github.com/containers/common/libimage/layer_tree.go
generated
vendored
22
vendor/github.com/containers/common/libimage/layer_tree.go
generated
vendored
@ -199,6 +199,17 @@ func (t *layerTree) children(ctx context.Context, parent *Image, all bool) ([]*I
|
|||||||
if parent.TopLayer() == "" {
|
if parent.TopLayer() == "" {
|
||||||
for i := range t.emptyImages {
|
for i := range t.emptyImages {
|
||||||
empty := t.emptyImages[i]
|
empty := t.emptyImages[i]
|
||||||
|
isManifest, err := empty.IsManifestList(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if isManifest {
|
||||||
|
// If this is a manifest list and is already
|
||||||
|
// marked as empty then no instance can be
|
||||||
|
// selected from this list therefore its
|
||||||
|
// better to skip this.
|
||||||
|
continue
|
||||||
|
}
|
||||||
isParent, err := checkParent(empty)
|
isParent, err := checkParent(empty)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -289,6 +300,17 @@ func (t *layerTree) parent(ctx context.Context, child *Image) (*Image, error) {
|
|||||||
if childID == empty.ID() {
|
if childID == empty.ID() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
isManifest, err := empty.IsManifestList(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if isManifest {
|
||||||
|
// If this is a manifest list and is already
|
||||||
|
// marked as empty then no instance can be
|
||||||
|
// selected from this list therefore its
|
||||||
|
// better to skip this.
|
||||||
|
continue
|
||||||
|
}
|
||||||
emptyOCI, err := t.toOCI(ctx, empty)
|
emptyOCI, err := t.toOCI(ctx, empty)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if ErrorIsImageUnknown(err) {
|
if ErrorIsImageUnknown(err) {
|
||||||
|
4
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
4
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -669,8 +669,8 @@ default_sysctls = [
|
|||||||
# [engine.service_destinations.production]
|
# [engine.service_destinations.production]
|
||||||
# URI to access the Podman service
|
# URI to access the Podman service
|
||||||
# Examples:
|
# Examples:
|
||||||
# rootless "unix://run/user/$UID/podman/podman.sock" (Default)
|
# rootless "unix:///run/user/$UID/podman/podman.sock" (Default)
|
||||||
# rootful "unix://run/podman/podman.sock (Default)
|
# rootful "unix:///run/podman/podman.sock (Default)
|
||||||
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
|
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
|
||||||
# remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock
|
# remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock
|
||||||
#
|
#
|
||||||
|
4
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
4
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
@ -541,8 +541,8 @@ default_sysctls = [
|
|||||||
# [service_destinations.production]
|
# [service_destinations.production]
|
||||||
# URI to access the Podman service
|
# URI to access the Podman service
|
||||||
# Examples:
|
# Examples:
|
||||||
# rootless "unix://run/user/$UID/podman/podman.sock" (Default)
|
# rootless "unix:///run/user/$UID/podman/podman.sock" (Default)
|
||||||
# rootful "unix://run/podman/podman.sock (Default)
|
# rootful "unix:///run/podman/podman.sock (Default)
|
||||||
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
|
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
|
||||||
# remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock
|
# remote rootful ssh://root@10.10.1.136:22/run/podman/podman.sock
|
||||||
#
|
#
|
||||||
|
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -268,7 +268,7 @@ func defaultFarmConfig() FarmConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// defaultEngineConfig eturns a default engine configuration. Note that the
|
// defaultEngineConfig returns a default engine configuration. Note that the
|
||||||
// config is different for root and rootless. It also parses the storage.conf.
|
// config is different for root and rootless. It also parses the storage.conf.
|
||||||
func defaultEngineConfig() (*EngineConfig, error) {
|
func defaultEngineConfig() (*EngineConfig, error) {
|
||||||
c := new(EngineConfig)
|
c := new(EngineConfig)
|
||||||
|
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
|
package version
|
||||||
|
|
||||||
// Version is the version of the build.
|
// Version is the version of the build.
|
||||||
const Version = "0.56.0"
|
const Version = "0.56.1-dev"
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -164,7 +164,7 @@ github.com/containers/buildah/pkg/sshagent
|
|||||||
github.com/containers/buildah/pkg/util
|
github.com/containers/buildah/pkg/util
|
||||||
github.com/containers/buildah/pkg/volumes
|
github.com/containers/buildah/pkg/volumes
|
||||||
github.com/containers/buildah/util
|
github.com/containers/buildah/util
|
||||||
# github.com/containers/common v0.56.0
|
# github.com/containers/common v0.56.1-0.20230919073449-d1d9d38d8282
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/containers/common/libimage
|
github.com/containers/common/libimage
|
||||||
github.com/containers/common/libimage/define
|
github.com/containers/common/libimage/define
|
||||||
|
Reference in New Issue
Block a user