Documentation
¶
Overview ¶
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2020-2021 Daniele Rondina <geaaru@sabayonlinux.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func SanitizeCategory(cat string, slot string) string
- type PortageConverterArtefact
- func (s *PortageConverterArtefact) GetBuildtimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
- func (a *PortageConverterArtefact) GetPackages() []string
- func (s *PortageConverterArtefact) GetRuntimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
- func (a *PortageConverterArtefact) GetTree() string
- func (s *PortageConverterArtefact) HasBuildtimeReplacement(pkg string) bool
- func (s *PortageConverterArtefact) HasRuntimeReplacement(pkg string) bool
- func (a *PortageConverterArtefact) IgnoreBuildtime(pkg string) bool
- func (a *PortageConverterArtefact) IgnoreRuntime(pkg string) bool
- type PortageConverterDepReplacements
- type PortageConverterInclude
- type PortageConverterPkg
- type PortageConverterReplacePackage
- type PortageConverterReplacements
- type PortageConverterReposcanConstraints
- type PortageConverterSkips
- type PortageConverterSpecs
- func (s *PortageConverterSpecs) AddReposcanDisabledUseFlags(uses []string)
- func (s *PortageConverterSpecs) AddReposcanSource(source string)
- func (s *PortageConverterSpecs) GenerateArtefactsMap()
- func (s *PortageConverterSpecs) GenerateReplacementsMap()
- func (s *PortageConverterSpecs) GetArtefactByPackage(pkg string) (*PortageConverterArtefact, error)
- func (s *PortageConverterSpecs) GetArtefacts() []PortageConverterArtefact
- func (s *PortageConverterSpecs) GetBuildtimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
- func (s *PortageConverterSpecs) GetRuntimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
- func (s *PortageConverterSpecs) HasBuildtimeReplacement(pkg string) bool
- func (s *PortageConverterSpecs) HasRuntimeReplacement(pkg string) bool
- type PortageConverterUseFlags
- type PortageResolver
- type PortageResolverOpts
- type PortageSolution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeCategory ¶
Types ¶
type PortageConverterArtefact ¶
type PortageConverterArtefact struct { Tree string `json:"tree" yaml:"tree"` Uses PortageConverterUseFlags `json:"uses,omitempty" yaml:"uses,omitempty"` IgnoreBuildDeps bool `json:"ignore_build_deps,omitempty" yaml:"ignore_build_deps,omitempty"` Packages []string `json:"packages" yaml:"packages"` Replacements PortageConverterReplacements `json:"replacements,omitempty" yaml:"replacements,omitempty"` MapReplacementsRuntime map[string]*PortageConverterReplacePackage `json:"-" yaml:"-"` MapReplacementsBuildtime map[string]*PortageConverterReplacePackage `json:"-" yaml:"-"` MapIgnoreRuntime map[string]bool `json:"-" yaml:"-"` MapIgnoreBuildtime map[string]bool `json:"-" yaml:"-"` }
func (*PortageConverterArtefact) GetBuildtimeReplacement ¶
func (s *PortageConverterArtefact) GetBuildtimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
func (*PortageConverterArtefact) GetPackages ¶
func (a *PortageConverterArtefact) GetPackages() []string
func (*PortageConverterArtefact) GetRuntimeReplacement ¶
func (s *PortageConverterArtefact) GetRuntimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
func (*PortageConverterArtefact) GetTree ¶
func (a *PortageConverterArtefact) GetTree() string
func (*PortageConverterArtefact) HasBuildtimeReplacement ¶
func (s *PortageConverterArtefact) HasBuildtimeReplacement(pkg string) bool
func (*PortageConverterArtefact) HasRuntimeReplacement ¶
func (s *PortageConverterArtefact) HasRuntimeReplacement(pkg string) bool
func (*PortageConverterArtefact) IgnoreBuildtime ¶
func (a *PortageConverterArtefact) IgnoreBuildtime(pkg string) bool
func (*PortageConverterArtefact) IgnoreRuntime ¶
func (a *PortageConverterArtefact) IgnoreRuntime(pkg string) bool
type PortageConverterDepReplacements ¶
type PortageConverterDepReplacements struct { Packages []PortageConverterReplacePackage `json:"packages,omitempty" yaml:"packages,omitempty"` Ignore []PortageConverterPkg `json:"ignore,omitempty" yaml:"ignore,omitempty"` }
type PortageConverterInclude ¶
type PortageConverterInclude struct { SkippedResolutions PortageConverterSkips `json:"skipped_resolutions,omitempty" yaml:"skipped_resolutions,omitempty"` Artefacts []PortageConverterArtefact `json:"artefacts,omitempty" yaml:"artefacts,omitempty"` }
func IncludeFromYaml ¶
func IncludeFromYaml(data []byte) (*PortageConverterInclude, error)
type PortageConverterPkg ¶
type PortageConverterReplacePackage ¶
type PortageConverterReplacePackage struct { From PortageConverterPkg `json:"from" yaml:"from"` To PortageConverterPkg `json:"to" yaml:"to"` }
type PortageConverterReplacements ¶
type PortageConverterReplacements struct { RuntimeDeps PortageConverterDepReplacements `json:"runtime_deps,omitempty" yaml:"runtime_deps,omitempty"` BuiltimeDeps PortageConverterDepReplacements `json:"buildtime_deps,omitempty" yaml:"buildtime_deps,omitempty"` }
type PortageConverterReposcanConstraints ¶
type PortageConverterReposcanConstraints struct {
Packages []string `json:"packages,omitempty" yaml:"packages,omitempty"`
}
type PortageConverterSkips ¶
type PortageConverterSkips struct { Packages []PortageConverterPkg `json:"packages,omitempty" yaml:"packages,omitempty"` Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"` }
type PortageConverterSpecs ¶
type PortageConverterSpecs struct { SkippedResolutions PortageConverterSkips `json:"skipped_resolutions,omitempty" yaml:"skipped_resolutions,omitempty"` IncludeFiles []string `json:"include_files,omitempty" yaml:"include_files,omitempty"` Artefacts []PortageConverterArtefact `json:"artefacts,omitempty" yaml:"artefacts,omitempty"` BuildTmplFile string `json:"build_template_file" yaml:"build_template_file"` // Reposcan options ReposcanRequiresWithSlot bool `json:"reposcan_requires_slot,omitempty" yaml:"reposcan_requires_slot,omitempty"` ReposcanSources []string `json:"reposcan_sources,omitempty" yaml:"reposcan_sources,omitempty"` ReposcanConstraints PortageConverterReposcanConstraints `json:"reposcan_contraints,omitempty" yaml:"reposcan_contraints,omitempty"` ReposcanDisabledUseFlags []string `json:"reposcan_disabled_use_flags,omitempty" yaml:"reposcan_disabled_use_flags,omitempty"` ReposcanDisabledKeywords []string `json:"reposcan_disabled_keywords,omitempty" yaml:"reposcan_disabled_keywords,omitempty"` Replacements PortageConverterReplacements `json:"replacements,omitempty" yaml:"replacements,omitempty"` MapArtefacts map[string]*PortageConverterArtefact `json:"-" yaml:"-"` MapReplacementsRuntime map[string]*PortageConverterReplacePackage `json:"-" yaml:"-"` MapReplacementsBuildtime map[string]*PortageConverterReplacePackage `json:"-" yaml:"-"` }
func LoadSpecsFile ¶
func LoadSpecsFile(file string) (*PortageConverterSpecs, error)
func SpecsFromYaml ¶
func SpecsFromYaml(data []byte) (*PortageConverterSpecs, error)
func (*PortageConverterSpecs) AddReposcanDisabledUseFlags ¶
func (s *PortageConverterSpecs) AddReposcanDisabledUseFlags(uses []string)
func (*PortageConverterSpecs) AddReposcanSource ¶
func (s *PortageConverterSpecs) AddReposcanSource(source string)
func (*PortageConverterSpecs) GenerateArtefactsMap ¶
func (s *PortageConverterSpecs) GenerateArtefactsMap()
func (*PortageConverterSpecs) GenerateReplacementsMap ¶
func (s *PortageConverterSpecs) GenerateReplacementsMap()
func (*PortageConverterSpecs) GetArtefactByPackage ¶
func (s *PortageConverterSpecs) GetArtefactByPackage(pkg string) (*PortageConverterArtefact, error)
func (*PortageConverterSpecs) GetArtefacts ¶
func (s *PortageConverterSpecs) GetArtefacts() []PortageConverterArtefact
func (*PortageConverterSpecs) GetBuildtimeReplacement ¶
func (s *PortageConverterSpecs) GetBuildtimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
func (*PortageConverterSpecs) GetRuntimeReplacement ¶
func (s *PortageConverterSpecs) GetRuntimeReplacement(pkg string) (*PortageConverterReplacePackage, error)
func (*PortageConverterSpecs) HasBuildtimeReplacement ¶
func (s *PortageConverterSpecs) HasBuildtimeReplacement(pkg string) bool
func (*PortageConverterSpecs) HasRuntimeReplacement ¶
func (s *PortageConverterSpecs) HasRuntimeReplacement(pkg string) bool
type PortageResolver ¶
type PortageResolver interface {
Resolve(pkg string, opts PortageResolverOpts) (*PortageSolution, error)
}
type PortageResolverOpts ¶
func NewPortageResolverOpts ¶
func NewPortageResolverOpts() PortageResolverOpts
func (*PortageResolverOpts) IsAdmitUseFlag ¶
func (o *PortageResolverOpts) IsAdmitUseFlag(u string) bool
type PortageSolution ¶
type PortageSolution struct { Package gentoo.GentooPackage `json:"package"` PackageDir string `json:"package_dir"` BuildDeps []gentoo.GentooPackage `json:"build-deps,omitempty"` RuntimeDeps []gentoo.GentooPackage `json:"runtime-deps,omitempty"` RuntimeConflicts []gentoo.GentooPackage `json:"runtime-conflicts,omitempty"` BuildConflicts []gentoo.GentooPackage `json:"build-conflicts,omitempty"` Description string `json:"description,omitempty"` Uri []string `json:"uri,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
func (*PortageSolution) SetLabel ¶
func (s *PortageSolution) SetLabel(k, v string)
func (*PortageSolution) String ¶
func (s *PortageSolution) String() string
func (*PortageSolution) ToPack ¶
func (s *PortageSolution) ToPack(runtime bool) *luet_pkg.DefaultPackage