rpmspec

package
v0.0.0-...-2a0a49f Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-4-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error when no RPM spec file or `rpmspec` command was found
	ErrNoSpec = fs.ErrNotExist
)

Functions

This section is empty.

Types

type RPMSpec

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

parser.VersionParser implementation rendering and parsing a RPM spec file

func New

func New(cmd, file string) *RPMSpec

New creates a new parser.Parser instance using the provided RPM spec file. the rpmspec executable is invoked using the provided path.

func NewSystem

func NewSystem(file string) *RPMSpec

NewSystem creates a new parser.Parser instance using the provided RPM spec file. the rpmspec executable is invoked as-is, relying on its presence in one of the PATH directories.

func TryParse

func TryParse(cmd, path string) (*RPMSpec, error)

TryParse attempts to parse the given directory for a RPM spec file. If no file was found or the given command was not found ErrNoRepository is returned. All other errors are a result of file access problems.

func TrySystemParse

func TrySystemParse(path string) (*RPMSpec, error)

TrySystemParse calls TryParse using the rpmspec command found in the PATH

func (*RPMSpec) Equal

func (s *RPMSpec) Equal(o *RPMSpec) bool

Equal compares the fields of this instance to the given one

func (*RPMSpec) ParseVersionInfo

func (s *RPMSpec) ParseVersionInfo() (*buildinfo.VersionInfo, error)

ParseVersionInfo implements the parser.VersionParser interface

func (*RPMSpec) String

func (s *RPMSpec) String() string

String implements the fmt.Stringer interface

Jump to

Keyboard shortcuts

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