Documentation ¶
Index ¶
- func GetVerStrFromPackageSpecList(pkgs []PackageSpec, packageName string) (string, error)
- func GetVerStrFromPackageSpecListPanic(pkgs []PackageSpec, packageName string) string
- func LoadRepositoriesFromFile(filename string) (map[string][]RepoConfig, error)
- type DistrosRepoConfigs
- type Package
- type PackageBuild
- type PackageInfo
- type PackageList
- type PackageSet
- type PackageSource
- type PackageSpec
- type RPM
- type RepoConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVerStrFromPackageSpecList ¶
func GetVerStrFromPackageSpecList(pkgs []PackageSpec, packageName string) (string, error)
func GetVerStrFromPackageSpecListPanic ¶
func GetVerStrFromPackageSpecListPanic(pkgs []PackageSpec, packageName string) string
func LoadRepositoriesFromFile ¶ added in v0.33.0
func LoadRepositoriesFromFile(filename string) (map[string][]RepoConfig, error)
Types ¶
type DistrosRepoConfigs ¶
type DistrosRepoConfigs map[string]map[string][]RepoConfig
type Package ¶
type Package struct { Name string Summary string Description string URL string Epoch uint Version string Release string Arch string BuildTime time.Time License string }
func (Package) ToPackageBuild ¶
func (pkg Package) ToPackageBuild() PackageBuild
func (Package) ToPackageInfo ¶
func (pkg Package) ToPackageInfo() PackageInfo
type PackageBuild ¶
type PackageBuild struct { Arch string `json:"arch"` BuildTime string `json:"build_time"` Epoch uint `json:"epoch"` Release string `json:"release"` Source PackageSource `json:"source"` Changelog string `json:"changelog"` BuildConfigRef string `json:"build_config_ref"` BuildEnvRef string `json:"build_env_ref"` Metadata struct{} `json:"metadata"` // it's just an empty struct in lorax-composer }
type PackageInfo ¶
type PackageInfo struct { Name string `json:"name"` Summary string `json:"summary"` Description string `json:"description"` Homepage string `json:"homepage"` UpstreamVCS string `json:"upstream_vcs"` Builds []PackageBuild `json:"builds"` Dependencies []PackageSpec `json:"dependencies,omitempty"` }
type PackageList ¶
type PackageList []Package
func (PackageList) Search ¶
func (packages PackageList) Search(globPatterns ...string) (PackageList, error)
func (PackageList) ToPackageInfos ¶
func (packages PackageList) ToPackageInfos() []PackageInfo
type PackageSet ¶
type PackageSet struct { Include []string Exclude []string Repositories []RepoConfig InstallWeakDeps bool }
The inputs to depsolve, a set of packages to include and a set of packages to exclude. The Repositories are used when depsolving this package set in addition to the base repositories.
func (PackageSet) Append ¶
func (ps PackageSet) Append(other PackageSet) PackageSet
Append the Include and Exclude package list from another PackageSet and return the result.
type PackageSource ¶
type PackageSpec ¶
type PackageSpec struct { Name string `json:"name"` Epoch uint `json:"epoch"` Version string `json:"version,omitempty"` Release string `json:"release,omitempty"` Arch string `json:"arch,omitempty"` RemoteLocation string `json:"remote_location,omitempty"` Checksum string `json:"checksum,omitempty"` Secrets string `json:"secrets,omitempty"` CheckGPG bool `json:"check_gpg,omitempty"` IgnoreSSL bool `json:"ignore_ssl,omitempty"` }
TODO: the public API of this package should not be reused for serialization.
func (*PackageSpec) GetEVRA ¶
func (ps *PackageSpec) GetEVRA() string
GetEVRA returns the package's Epoch:Version-Release.Arch string
func (*PackageSpec) GetNEVRA ¶
func (ps *PackageSpec) GetNEVRA() string
GetNEVRA returns the package's Name-Epoch:Version-Release.Arch string
type RPM ¶
type RPM struct { Type string `json:"type"` // must be 'rpm' Name string `json:"name"` Version string `json:"version"` Release string `json:"release"` Epoch *string `json:"epoch,omitempty"` Arch string `json:"arch"` Sigmd5 string `json:"sigmd5"` Signature *string `json:"signature"` }
func DeduplicateRPMs ¶
Deduplicate a list of RPMs based on NEVRA string
type RepoConfig ¶
type RepoConfig struct { // the repo id is not always required and is ignored in some cases. // For example, it is not required in dnf-json, but it is a required // field for creating a repo file in `/etc/yum.repos.d/` Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` BaseURLs []string `json:"baseurls,omitempty"` Metalink string `json:"metalink,omitempty"` MirrorList string `json:"mirrorlist,omitempty"` GPGKeys []string `json:"gpgkeys,omitempty"` CheckGPG *bool `json:"check_gpg,omitempty"` CheckRepoGPG *bool `json:"check_repo_gpg,omitempty"` Priority *int `json:"priority,omitempty"` IgnoreSSL *bool `json:"ignore_ssl,omitempty"` MetadataExpire string `json:"metadata_expire,omitempty"` ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` RHSM bool `json:"rhsm,omitempty"` Enabled *bool `json:"enabled,omitempty"` ImageTypeTags []string `json:"image_type_tags,omitempty"` PackageSets []string `json:"package_sets,omitempty"` // These fields are only filled out by the worker during the // depsolve job for certain baseurls. SSLCACert string `json:"sslcacert,omitempty"` SSLClientKey string `json:"sslclientkey,omitempty"` SSLClientCert string `json:"sslclientcert,omitempty"` }
func (*RepoConfig) Hash ¶
func (r *RepoConfig) Hash() string
Hash calculates an ID string that uniquely represents a repository configuration. The Name and ImageTypeTags fields are not considered in the calculation.