simplify package set chain handling
Move package set chain collation to the distro package and add repositories to the package sets while returning the package sets from their source, i.e., the ImageType.PackageSets() method. This also removes the concept of "base repositories". There are no longer repositories that are added implicitly to all package sets but instead each package set needs to specify *all* the repositories it will be depsolved against. This paves the way for the requirement we have for building RHEL 7 images with a RHEL 8 build root. The build root package set has to be depsolved against RHEL 8 repositories without any "base repos" included. This is now possible since package sets and repositories are explicitly associated from the start and there is no implicit global repository set. The change requires adding a list of PackageSet names to the core rpmmd.RepoConfig. In the cloud API, repositories that are limited to specific package sets already contain the correct package set names and these are now copied to the internal RepoConfig when converting types in genRepoConfig(). The user-specified repositories are only associated with the payload package sets like before.
This commit is contained in:
parent
6fbddeea35
commit
c092783a70
33 changed files with 323 additions and 401 deletions
|
|
@ -105,19 +105,16 @@ func (pn *PipelineNames) All() []string {
|
|||
return append(pn.Build, pn.Payload...)
|
||||
}
|
||||
|
||||
// DepsolveJob defines the parameters of one or more depsolve jobs. Each
|
||||
// package set is meant to be depsolved separately. The repositories defined
|
||||
// in Repos are used for all package sets, whereas the repositories defined in
|
||||
// PackageSetsRepos are only used by the package sets that share the same name
|
||||
// (map key).
|
||||
// DepsolveJob defines the parameters of one or more depsolve jobs. Each named
|
||||
// list of package sets defines a separate job. Lists with multiple package
|
||||
// sets are depsolved in a chain, combining the results of sequential depsolves
|
||||
// into a single PackageSpec list in the result. Each PackageSet defines the
|
||||
// repositories it will be depsolved against.
|
||||
type DepsolveJob struct {
|
||||
PackageSetsChains map[string][]string `json:"package_sets_chains"`
|
||||
PackageSets map[string]rpmmd.PackageSet `json:"package_sets"`
|
||||
Repos []rpmmd.RepoConfig `json:"repos"`
|
||||
ModulePlatformID string `json:"module_platform_id"`
|
||||
Arch string `json:"arch"`
|
||||
Releasever string `json:"releasever"`
|
||||
PackageSetsRepos map[string][]rpmmd.RepoConfig `json:"package_sets_repositories,omitempty"`
|
||||
PackageSets map[string][]rpmmd.PackageSet `json:"package_sets"`
|
||||
ModulePlatformID string `json:"module_platform_id"`
|
||||
Arch string `json:"arch"`
|
||||
Releasever string `json:"releasever"`
|
||||
}
|
||||
|
||||
type ErrorType string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue