solver

package
v0.31.2-geaaru Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2022 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Index

Constants

View Source
const (
	SingleCoreSimple = 0
	SingleCoreV2     = 1
	SingleCoreV3     = 2
)
View Source
const (
	UpdatePackage = "U"
	AddPackage    = "N"
	RemovePackage = "D"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation struct {
	Action   string                    `yaml:"action" json:"action"`
	Artifact *artifact.PackageArtifact `yaml:"artefact" json:"artefact"`
}

func NewOperation

func NewOperation(action string, art *artifact.PackageArtifact) *Operation

type PackageSolver

type PackageSolver interface {
	Install(p *[]*pkg.DefaultPackage) (*artifact.ArtifactsPack, *artifact.ArtifactsPack, error)
	Upgrade() (*artifact.ArtifactsPack, *artifact.ArtifactsPack, *artifact.ArtifactsPack, error)
	GetType() SolverType
	SetDatabase(pkg.PackageDatabase)
	OrderOperations(p2i, p2u, p2r *artifact.ArtifactsPack) (*[]*Operation, error)
}

PackageSolver is an interface to a generic package solving algorithm

func NewSolverImplementation

func NewSolverImplementation(stype string, cfg *config.LuetConfig, opts *SolverOpts) *PackageSolver

type Solver

type Solver struct {
	Config *config.LuetConfig `yaml:",inline" json:",inline"`
	Opts   *SolverOpts        `yaml:"opts" json:"opts"`

	Database pkg.PackageDatabase               `yaml:"-" json:"-"`
	Searcher wagon.Searcher                    `yaml:"-" json:"-"`
	MapRepos map[string]*wagon.WagonRepository `yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

func NewSolver

func NewSolver(cfg *config.LuetConfig, opts *SolverOpts) *Solver

func (*Solver) GetType

func (s *Solver) GetType() SolverType

func (*Solver) Install

func (*Solver) OrderOperations

func (s *Solver) OrderOperations(p2i, p2u, p2r *artifact.ArtifactsPack) (*[]*Operation, error)

func (*Solver) SetDatabase

func (s *Solver) SetDatabase(d pkg.PackageDatabase)

type SolverOpts

type SolverOpts struct {
	IgnoreConflicts bool
	Force           bool
	NoDeps          bool
	IgnoreMasks     bool
}

func NewSolverOpts

func NewSolverOpts() *SolverOpts

type SolverType

type SolverType int

Jump to

Keyboard shortcuts

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