reposcan

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

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/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EbuildDependencies

type EbuildDependencies struct {
	Dependencies []*GentooDependency
}

func ParseDependencies

func ParseDependencies(rdepend string) (*EbuildDependencies, error)

func ParseDependenciesMultiline

func ParseDependenciesMultiline(rdepend string) (*EbuildDependencies, error)

func (*EbuildDependencies) GetDependencies

func (r *EbuildDependencies) GetDependencies() []*GentooDependency

func (*EbuildDependencies) GetUseFlags

func (r *EbuildDependencies) GetUseFlags() []string

type GentooDependency

type GentooDependency struct {
	Use          string
	UseCondition _gentoo.PackageCond
	SubDeps      []*GentooDependency
	Dep          *_gentoo.GentooPackage
	DepInOr      bool
}

func NewGentooDependency

func NewGentooDependency(pkg, use string) (*GentooDependency, error)

func NewGentooDependencyWithSubdeps

func NewGentooDependencyWithSubdeps(pkg, use string, subdeps []*GentooDependency) (*GentooDependency, error)

func (*GentooDependency) AddSubDependency

func (d *GentooDependency) AddSubDependency(pkg, use string) (*GentooDependency, error)

func (*GentooDependency) GetDepsList

func (d *GentooDependency) GetDepsList() []*GentooDependency

func (*GentooDependency) GetUseFlags

func (d *GentooDependency) GetUseFlags() []string

func (*GentooDependency) String

func (d *GentooDependency) String() string

type RepoScanAtom

type RepoScanAtom struct {
	Atom string `json:"atom" yaml:"atom"`

	Category string     `json:"category" yaml:"category"`
	Package  string     `json:"package" yaml:"package"`
	Revision string     `json:"revision" yaml:"revision"`
	CatPkg   string     `json:"catpkg" yaml:"catpkg"`
	Eclasses [][]string `json:"eclasses" yaml:"eclasses"`

	Kit    string `json:"kit" yaml:"kit"`
	Branch string `json:"branch" yaml:"branch"`

	// Relations contains the list of the keys defined on
	// relations_by_kind. The values could be RDEPEND, DEPEND, BDEPEND
	Relations       []string            `json:"relations" yaml:"relations"`
	RelationsByKind map[string][]string `json:"relations_by_kind" yaml:"relations_by_kind"`

	// Metadata contains ebuild variables.
	// Ex: SLOT, SRC_URI, HOMEPAGE, etc.
	Metadata    map[string]string `json:"metadata" yaml:"metadata"`
	MetadataOut string            `json:"metadata_out" yaml:"metadata_out"`

	ManifestMd5 string `json:"manifest_md5" yaml:"manifest_md5"`
	Md5         string `json:"md5" yaml:"md5"`

	// Fields present on failure
	Status string `json:"status,omitempty" yaml:"status,omitempty"`
	Output string `json:"output,omitempty" yaml:"output,omitempty"`

	Files []RepoScanFile `json:"files" yaml:"files"`
}

func (*RepoScanAtom) GetBuildtimeDeps

func (r *RepoScanAtom) GetBuildtimeDeps() ([]gentoo.GentooPackage, error)

func (*RepoScanAtom) GetCategory

func (r *RepoScanAtom) GetCategory() string

func (*RepoScanAtom) GetMetadataValue

func (r *RepoScanAtom) GetMetadataValue(k string) string

func (*RepoScanAtom) GetPackageName

func (r *RepoScanAtom) GetPackageName() string

func (*RepoScanAtom) GetRuntimeDeps

func (r *RepoScanAtom) GetRuntimeDeps() ([]gentoo.GentooPackage, error)

func (*RepoScanAtom) HasMetadataKey

func (r *RepoScanAtom) HasMetadataKey(k string) bool

func (*RepoScanAtom) ToGentooPackage

func (r *RepoScanAtom) ToGentooPackage() (*gentoo.GentooPackage, error)

type RepoScanFile

type RepoScanFile struct {
	SrcUri []string          `json:"src_uri"`
	Size   string            `json:"size"`
	Hashes map[string]string `json:"hashes"`
	Name   string            `json:"name"`
}

type RepoScanResolver

type RepoScanResolver struct {
	JsonSources       []string
	Sources           []RepoScanSpec
	Constraints       []string
	MapConstraints    map[string]([]gentoo.GentooPackage)
	Map               map[string]([]RepoScanAtom)
	IgnoreMissingDeps bool
	DepsWithSlot      bool
	DisabledUseFlags  []string
	DisabledKeywords  []string
}

func NewRepoScanResolver

func NewRepoScanResolver() *RepoScanResolver

func (*RepoScanResolver) BuildMap

func (r *RepoScanResolver) BuildMap() error

func (*RepoScanResolver) GetDepsWithSlot

func (r *RepoScanResolver) GetDepsWithSlot() bool

func (*RepoScanResolver) GetDisabledKeywords

func (r *RepoScanResolver) GetDisabledKeywords() []string

func (*RepoScanResolver) GetDisabledUseFlags

func (r *RepoScanResolver) GetDisabledUseFlags() []string

func (*RepoScanResolver) GetLastPackage

func (r *RepoScanResolver) GetLastPackage(pkg string) (*RepoScanAtom, error)

func (*RepoScanResolver) GetMap

func (r *RepoScanResolver) GetMap() map[string]([]RepoScanAtom)

func (*RepoScanResolver) IsDisableUseFlag

func (r *RepoScanResolver) IsDisableUseFlag(u string) bool

func (*RepoScanResolver) IsIgnoreMissingDeps

func (r *RepoScanResolver) IsIgnoreMissingDeps() bool

func (*RepoScanResolver) IsPresentPackage

func (r *RepoScanResolver) IsPresentPackage(pkg string) bool

func (*RepoScanResolver) KeywordsIsAdmit

func (r *RepoScanResolver) KeywordsIsAdmit(atom *RepoScanAtom, p *gentoo.GentooPackage) (bool, error)

func (*RepoScanResolver) LoadJson

func (r *RepoScanResolver) LoadJson(path string) error

func (*RepoScanResolver) LoadJsonFiles

func (r *RepoScanResolver) LoadJsonFiles(verbose bool) error

func (*RepoScanResolver) LoadRawJson

func (r *RepoScanResolver) LoadRawJson(raw, file string) error

func (*RepoScanResolver) PackageIsAdmit

func (r *RepoScanResolver) PackageIsAdmit(target, atom *gentoo.GentooPackage) (bool, error)

func (*RepoScanResolver) Resolve

func (*RepoScanResolver) SetDepsWithSlot

func (r *RepoScanResolver) SetDepsWithSlot(v bool)

func (*RepoScanResolver) SetDisabledKeywords

func (r *RepoScanResolver) SetDisabledKeywords(k []string)

func (*RepoScanResolver) SetDisabledUseFlags

func (r *RepoScanResolver) SetDisabledUseFlags(u []string)

func (*RepoScanResolver) SetIgnoreMissingDeps

func (r *RepoScanResolver) SetIgnoreMissingDeps(v bool)

type RepoScanSpec

type RepoScanSpec struct {
	CacheDataVersion string                  `json:"cache_data_version" yaml:"cache_data_version"`
	Atoms            map[string]RepoScanAtom `json:"atoms" yaml:"atoms"`

	File string `json:"-"`
}

func (*RepoScanSpec) Yaml

func (r *RepoScanSpec) Yaml() (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL