worker: Add search job implementation to worker client
This is similar to the depsolve job, and it shares the solver (which supports locking, as does DNF itself). This will allow searching for specific package names, names with globs, or names as substrings of other names using * as the wildcard. Related: RHEL-60136
This commit is contained in:
parent
84c0f79286
commit
d8df7e7cd4
4 changed files with 100 additions and 1 deletions
|
|
@ -217,6 +217,25 @@ type DepsolveJobResult struct {
|
|||
JobResult
|
||||
}
|
||||
|
||||
// SearchPackagesJob defines the parameters for a dnf metadata search
|
||||
// It will search the included repositories for packages matching the
|
||||
// package strings
|
||||
// Package names support globs using '*' and will search for a substring
|
||||
// match if '*foopkg*' is used.
|
||||
type SearchPackagesJob struct {
|
||||
Packages []string `json:"packages"`
|
||||
Repositories []rpmmd.RepoConfig `json:"repos"`
|
||||
ModulePlatformID string `json:"module_platform_id"`
|
||||
Arch string `json:"arch"`
|
||||
Releasever string `json:"releasever"`
|
||||
}
|
||||
|
||||
// SearchPackagesJobResult returns the details of the search packages
|
||||
type SearchPackagesJobResult struct {
|
||||
Packages rpmmd.PackageList `json:"packages"`
|
||||
JobResult
|
||||
}
|
||||
|
||||
type ManifestJobByID struct{}
|
||||
|
||||
// OSBuildComposerDepModule contains information about a module used by
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const (
|
|||
JobTypeKojiInit string = "koji-init"
|
||||
JobTypeKojiFinalize string = "koji-finalize"
|
||||
JobTypeDepsolve string = "depsolve"
|
||||
JobTypeSearchPackages string = "search-packages"
|
||||
JobTypeManifestIDOnly string = "manifest-id-only"
|
||||
JobTypeContainerResolve string = "container-resolve"
|
||||
JobTypeFileResolve string = "file-resolve"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue