rpm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Name  string `xml:"name,attr"`
	Flags string `xml:"flags,attr"`
	Epoch string `xml:"epoch,attr"`
	Ver   string `xml:"ver,attr"`
	Rel   string `xml:"rel,attr"`
}

type Index

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

func NewIndex

func NewIndex(all []*Meta, opt Options) *Index

func (*Index) Resolve

func (ix *Index) Resolve(seeds []string) ([]*Meta, error)

Resolve returns the seeds and their requires closure, sorted by name; conditional deps are rechecked until stable.

type Meta

type Meta struct {
	Name    string `xml:"name"`
	Arch    string `xml:"arch"`
	Version Entry  `xml:"version"`
	Sum     string `xml:"checksum"`
	Href    struct {
		Href string `xml:"href,attr"`
	} `xml:"location"`
	Size struct {
		Package int `xml:"package,attr"`
	} `xml:"size"`
	Provides   []Entry  `xml:"format>provides>entry"`
	Requires   []Entry  `xml:"format>requires>entry"`
	Recommends []Entry  `xml:"format>recommends>entry"`
	Conflicts  []Entry  `xml:"format>conflicts>entry"`
	Obsoletes  []Entry  `xml:"format>obsoletes>entry"`
	Files      []string `xml:"format>file"`
	// contains filtered or unexported fields
}

func Fetch

func Fetch(ctx context.Context, c *http.Client, keyring openpgp.EntityList, base, arch string, sums ...string) ([]*Meta, error)

Fetch reads repomd.xml, checked by repomd.xml.asc when keyring is set and by sha256 when sums are given, then primary.

func ParsePrimary

func ParsePrimary(r io.Reader, arch, repo string) ([]*Meta, error)

ParsePrimary reads repodata primary.xml packages built for arch or noarch; repo tags each package.

func (*Meta) EVR

func (m *Meta) EVR() string

func (*Meta) Repo

func (m *Meta) Repo() string

type Options

type Options struct {
	Prefer []string                              `json:"prefer,omitempty"`
	Weak   bool                                  `json:"weak,omitempty"`
	Choice func(dep, picked string, choices int) `json:"-"`
}

Options steer Resolve: Prefer wins a choice between providers, Weak also installs Recommends, Choice sees guesses.

Jump to

Keyboard shortcuts

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