1
0

feat: use distro info to create the container

This commit is contained in:
2023-05-23 16:54:34 +00:00
parent f2ce20e53b
commit 7ca989fd8d
12 changed files with 130 additions and 150 deletions

View File

@@ -20,19 +20,12 @@ func init() {
}
for _, release := range releases {
container := "out_of_tree_ubuntu_" + release
container = strings.Replace(container, ".", "__", -1)
distro.Register(Ubuntu{
release: release,
container: container,
})
distro.Register(Ubuntu{release: release})
}
}
type Ubuntu struct {
release string
container string
release string
}
func (u Ubuntu) Equal(d distro.Distro) bool {
@@ -44,7 +37,7 @@ func (u Ubuntu) Distro() distro.Distro {
}
func (u Ubuntu) Packages() (pkgs []string, err error) {
c, err := container.New(u.container)
c, err := container.New(u.Distro())
if err != nil {
return
}