dep

package
v12.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReasonNames = map[Reason]string{
	Explicit: gotext.Get("Explicit"),
	Dep:      gotext.Get("Dependency"),
	MakeDep:  gotext.Get("Make Dependency"),
	CheckDep: gotext.Get("Check Dependency"),
}
View Source
var SourceNames = map[Source]string{
	AUR:     gotext.Get("AUR"),
	Sync:    gotext.Get("Sync"),
	Local:   gotext.Get("Local"),
	SrcInfo: gotext.Get("SRCINFO"),
	Missing: gotext.Get("Missing"),
}

Functions

func ComputeCombinedDepList

func ComputeCombinedDepList(pkg *aur.Pkg, noDeps, noCheckDeps bool) []string

Compute dependency lists used in Package dep searching and ordering. Order sensitive TOFIX.

Types

type Base

type Base []*aur.Pkg

Base is an AUR base package.

func GetBases

func GetBases(pkgs []aur.Pkg) []Base

func (Base) AnyIsInSet

func (b Base) AnyIsInSet(set stringset.StringSet) bool

func (Base) Pkgbase

func (b Base) Pkgbase() string

Pkgbase returns the first base package.

func (Base) String

func (b Base) String() string

Packages foo and bar from a pkgbase named base would print like so: base (foo bar).

func (Base) URLPath

func (b Base) URLPath() string

URLPath returns the first base package URL.

func (Base) Version

func (b Base) Version() string

Version returns the first base package version.

type Grapher

type Grapher struct {
	// contains filtered or unexported fields
}

func NewGrapher

func NewGrapher(dbExecutor db.Executor, aurCache aurc.QueryClient,
	fullGraph, noConfirm, noDeps, noCheckDeps, needed bool,
	logger *text.Logger,
) *Grapher

func (*Grapher) GraphAURTarget

func (g *Grapher) GraphAURTarget(ctx context.Context,
	graph *topo.Graph[string, *InstallInfo],
	pkg *aurc.Pkg, instalInfo *InstallInfo,
) *topo.Graph[string, *InstallInfo]

func (*Grapher) GraphFromAUR

func (g *Grapher) GraphFromAUR(ctx context.Context,
	graph *topo.Graph[string, *InstallInfo],
	targets []string,
) (*topo.Graph[string, *InstallInfo], error)

func (*Grapher) GraphFromSrcInfo

func (g *Grapher) GraphFromSrcInfo(ctx context.Context, graph *topo.Graph[string, *InstallInfo], pkgBuildDir string,
	pkgbuild *gosrc.Srcinfo,
) (*topo.Graph[string, *InstallInfo], error)

func (*Grapher) GraphFromTargets

func (g *Grapher) GraphFromTargets(ctx context.Context,
	graph *topo.Graph[string, *InstallInfo], targets []string,
) (*topo.Graph[string, *InstallInfo], error)

func (*Grapher) GraphSyncPkg

func (g *Grapher) GraphSyncPkg(ctx context.Context,
	graph *topo.Graph[string, *InstallInfo],
	pkg alpm.IPackage, instalInfo *InstallInfo,
) *topo.Graph[string, *InstallInfo]

func (*Grapher) ValidateAndSetNodeInfo

func (g *Grapher) ValidateAndSetNodeInfo(graph *topo.Graph[string, *InstallInfo],
	node string, nodeInfo *topo.NodeInfo[*InstallInfo],
)

type InstallInfo

type InstallInfo struct {
	Source       Source
	Reason       Reason
	Version      string
	LocalVersion string
	SrcinfoPath  *string
	AURBase      *string
	SyncDBName   *string

	Upgrade bool
	Devel   bool
}

func (*InstallInfo) String

func (i *InstallInfo) String() string

type Order

type Order struct {
	Aur     []Base
	Repo    []db.IPackage
	Runtime stringset.StringSet
}

func GetOrder

func GetOrder(dp *Pool, noDeps, noCheckDeps bool) *Order

func (*Order) GetMake

func (do *Order) GetMake() []string

func (*Order) HasMake

func (do *Order) HasMake() bool

func (*Order) Print

func (do *Order) Print()

Print prints repository packages to be downloaded.

type Pool

type Pool struct {
	Targets      []Target
	Explicit     stringset.StringSet
	Repo         map[string]db.IPackage
	Aur          map[string]*query.Pkg
	AurCache     map[string]*query.Pkg
	Groups       []string
	AlpmExecutor db.Executor
	Warnings     *query.AURWarnings
	// contains filtered or unexported fields
}

func GetPool

func GetPool(ctx context.Context, pkgs []string,
	warnings *query.AURWarnings,
	dbExecutor db.Executor,
	aurClient rpc.ClientInterface,
	mode parser.TargetMode,
	ignoreProviders, noConfirm, provides bool,
	rebuild string, splitN int, noDeps bool, noCheckDeps bool, assumeInstalled []string,
) (*Pool, error)

func (*Pool) CheckConflicts

func (dp *Pool) CheckConflicts(useAsk, noConfirm, noDeps bool) (stringset.MapStringSet, error)

func (*Pool) CheckMissing

func (dp *Pool) CheckMissing(noDeps, noCheckDeps bool) error

func (*Pool) ResolveRepoDependency

func (dp *Pool) ResolveRepoDependency(pkg db.IPackage, noDeps bool)

func (*Pool) ResolveTargets

func (dp *Pool) ResolveTargets(ctx context.Context, pkgs []string,
	mode parser.TargetMode,
	ignoreProviders, noConfirm, provides bool, rebuild string, splitN int, noDeps, noCheckDeps bool, assumeInstalled []string,
) error

Includes db/ prefixes and group installs.

type Reason

type Reason int
const (
	Explicit Reason = iota // 0
	Dep                    // 1
	MakeDep                // 2
	CheckDep               // 3
)

func (Reason) String

func (r Reason) String() string

type Source

type Source int
const (
	AUR Source = iota
	Sync
	Local
	SrcInfo
	Missing
)

func (Source) String

func (s Source) String() string

type Target

type Target struct {
	DB      string
	Name    string
	Mod     string
	Version string
}

func ToTarget

func ToTarget(pkg string) Target

func (Target) DepString

func (t Target) DepString() string

func (Target) String

func (t Target) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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