From 640dfac7a7648ce67a8592fdea665178ff8d3d76 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 24 May 2022 12:19:48 +0200 Subject: [PATCH] dnfjson: remove one-shot helper functions They were originally added as convenience functions for single-case calls, but they're not that useful and they have a million function arguments, which isn't pretty. --- internal/dnfjson/dnfjson.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/dnfjson/dnfjson.go b/internal/dnfjson/dnfjson.go index 6d92ce513..8cfd1c8ad 100644 --- a/internal/dnfjson/dnfjson.go +++ b/internal/dnfjson/dnfjson.go @@ -86,11 +86,6 @@ func NewSolver(modulePlatformID string, releaseVer string, arch string, cacheDir return s.NewWithConfig(modulePlatformID, releaseVer, arch) } -// Depsolve the given packages with explicit excludes using the given configuration and repos -func Depsolve(pkgSets []rpmmd.PackageSet, modulePlatformID string, releaseVer string, arch string, cacheDir string) ([]rpmmd.PackageSpec, error) { - return NewSolver(modulePlatformID, releaseVer, arch, cacheDir).Depsolve(pkgSets) -} - // Depsolve the list of required package sets with explicit excludes using // their associated repositories. Each package set is depsolved as a separate // transactions in a chain. It returns a list of all packages (with solved @@ -113,10 +108,6 @@ func (s *Solver) Depsolve(pkgSets []rpmmd.PackageSet) ([]rpmmd.PackageSpec, erro return result.toRPMMD(repoMap), nil } -func FetchMetadata(repos []rpmmd.RepoConfig, modulePlatformID string, releaseVer string, arch string, cacheDir string) (rpmmd.PackageList, error) { - return NewSolver(modulePlatformID, releaseVer, arch, cacheDir).FetchMetadata(repos) -} - func (s *Solver) FetchMetadata(repos []rpmmd.RepoConfig) (rpmmd.PackageList, error) { req, err := s.makeDumpRequest(repos) if err != nil {