setup

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDebug

func SetDebug(debug bool)

Enable the delivery of debug messages to the logger. Only meaningful if a logger is also set.

func SetLogger

func SetLogger(logger log_Logger)

Specify the *log.Logger object where log messages should be sent to.

Types

type Archive

type Archive struct {
	Name       string
	Version    string
	Suites     []string
	Components []string
	PubKeys    []*packet.PublicKey
}

Archive is the location from which binary packages are obtained.

type FetchOptions

type FetchOptions struct {
	Label    string
	Version  string
	CacheDir string
}

type Package

type Package struct {
	Name    string
	Path    string
	Archive string
	Slices  map[string]*Slice
}

Package holds a collection of slices that represent parts of themselves.

type PathInfo

type PathInfo struct {
	Kind PathKind
	Info string
	Mode uint

	Mutable bool
	Until   PathUntil
	Arch    []string
}

func (*PathInfo) SameContent

func (pi *PathInfo) SameContent(other *PathInfo) bool

SameContent returns whether the path has the same content properties as some other path. In other words, the resulting file/dir entry is the same. The Mutable flag must also match, as that's a common agreement that the actual content is not well defined upfront.

type PathKind

type PathKind string
const (
	DirPath     PathKind = "dir"
	CopyPath    PathKind = "copy"
	GlobPath    PathKind = "glob"
	TextPath    PathKind = "text"
	SymlinkPath PathKind = "symlink"
)

type PathUntil

type PathUntil string
const (
	UntilNone   PathUntil = ""
	UntilMutate PathUntil = "mutate"
)

type Release

type Release struct {
	Path           string
	Packages       map[string]*Package
	Archives       map[string]*Archive
	DefaultArchive string
}

Release is a collection of package slices targeting a particular distribution version.

func FetchRelease

func FetchRelease(options *FetchOptions) (*Release, error)

func ReadRelease

func ReadRelease(dir string) (*Release, error)

type Selection

type Selection struct {
	Release *Release
	Slices  []*Slice
}

Selection holds the required configuration to create a Build for a selection of slices from a Release. It's still an abstract proposal in the sense that the real information coming from pacakges is still unknown, so referenced paths could potentially be missing, for example.

func Select

func Select(release *Release, slices []SliceKey) (*Selection, error)

type Slice

type Slice struct {
	Package   string
	Name      string
	Essential []SliceKey
	Contents  map[string]PathInfo
	Scripts   SliceScripts
}

Slice holds the details about a package slice.

func (*Slice) String

func (s *Slice) String() string

type SliceKey

type SliceKey struct {
	Package string
	Slice   string
}

func ParseSliceKey

func ParseSliceKey(sliceKey string) (SliceKey, error)

func (SliceKey) String

func (s SliceKey) String() string

type SliceScripts

type SliceScripts struct {
	Mutate string
}

Jump to

Keyboard shortcuts

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