summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/source/markdown/podman-info.1.md1
-rw-r--r--libpod/define/info.go2
-rw-r--r--libpod/info.go6
3 files changed, 9 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-info.1.md b/docs/source/markdown/podman-info.1.md
index 7127f9026..21ca35eef 100644
--- a/docs/source/markdown/podman-info.1.md
+++ b/docs/source/markdown/podman-info.1.md
@@ -42,6 +42,7 @@ host:
cpus: 8
distribution:
distribution: fedora
+ variant: workstation
version: "34"
eventLogger: journald
hostname: localhost.localdomain
diff --git a/libpod/define/info.go b/libpod/define/info.go
index 73df80087..f4aa0031c 100644
--- a/libpod/define/info.go
+++ b/libpod/define/info.go
@@ -78,7 +78,9 @@ type IDMappings struct {
// for libpod
type DistributionInfo struct {
Distribution string `json:"distribution"`
+ Variant string `json:"variant,omitempty"`
Version string `json:"version"`
+ Codename string `json:"codename,omitempty"`
}
// ConmonInfo describes the conmon executable being used
diff --git a/libpod/info.go b/libpod/info.go
index 31ec9cdc1..2eba4bbff 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -370,9 +370,15 @@ func (r *Runtime) GetHostDistributionInfo() define.DistributionInfo {
if strings.HasPrefix(l.Text(), "ID=") {
dist.Distribution = strings.TrimPrefix(l.Text(), "ID=")
}
+ if strings.HasPrefix(l.Text(), "VARIANT_ID=") {
+ dist.Variant = strings.Trim(strings.TrimPrefix(l.Text(), "VARIANT_ID="), "\"")
+ }
if strings.HasPrefix(l.Text(), "VERSION_ID=") {
dist.Version = strings.Trim(strings.TrimPrefix(l.Text(), "VERSION_ID="), "\"")
}
+ if strings.HasPrefix(l.Text(), "VERSION_CODENAME=") {
+ dist.Codename = strings.Trim(strings.TrimPrefix(l.Text(), "VERSION_CODENAME="), "\"")
+ }
}
return dist
}