File: dnf.go

package info (click to toggle)
distrobuilder 3.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,468 kB
  • sloc: sh: 204; makefile: 75
file content (49 lines) | stat: -rw-r--r-- 733 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package managers

import (
	"github.com/lxc/distrobuilder/shared"
)

type dnf struct {
	common
}

// NewDnf creates a new Manager instance.
func (m *dnf) load() error {
	m.commands = managerCommands{
		clean:   "dnf",
		install: "dnf",
		refresh: "dnf",
		remove:  "dnf",
		update:  "dnf",
	}

	m.flags = managerFlags{
		global: []string{
			"-y",
		},
		install: []string{
			"install",
			"--nobest",
		},
		remove: []string{
			"remove",
		},
		refresh: []string{
			"makecache",
		},
		update: []string{
			"upgrade",
			"--nobest",
		},
		clean: []string{
			"clean", "all",
		},
	}

	return nil
}

func (m *dnf) manageRepository(repoAction shared.DefinitionPackagesRepository) error {
	return yumManageRepository(repoAction)
}