Add apt_rpm package manager

ALT Linux apt does not support --auto-remove flag with remove operation

Signed-off-by: Mikhail Gordeev <obirvalger@altlinux.org>
This commit is contained in:
Mikhail Gordeev 2019-03-22 20:01:18 +03:00
parent 6103aa0aa5
commit 73f463c1e9
3 changed files with 31 additions and 0 deletions

28
managers/apt_rpm.go Normal file
View File

@ -0,0 +1,28 @@
package managers
// NewAptRPM creates a new Manager instance.
func NewAptRPM() *Manager {
return &Manager{
command: "apt-get",
flags: ManagerFlags{
clean: []string{
"clean",
},
global: []string{
"-y",
},
install: []string{
"install",
},
remove: []string{
"remove",
},
refresh: []string{
"update",
},
update: []string{
"dist-upgrade",
},
},
}
}

View File

@ -32,6 +32,8 @@ func Get(name string) *Manager {
return NewApk()
case "apt":
return NewApt()
case "apt_rpm":
return NewAptRPM()
case "dnf":
return NewDnf()
case "pacman":

View File

@ -250,6 +250,7 @@ func (d *Definition) Validate() error {
validManagers := []string{
"apk",
"apt",
"apt_rpm",
"dnf",
"pacman",
"portage",