gentoo

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: GPL-3.0 Imports: 6 Imported by: 10

Documentation

Overview

Copyright (C) 2017-2021 Daniele Rondina <geaaru@sabayonlinux.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	PkgCondInvalid = 0
	// >
	PkgCondGreater = 1
	// >=
	PkgCondGreaterEqual = 2
	// <
	PkgCondLess = 3
	// <=
	PkgCondLessEqual = 4
	// =
	PkgCondEqual = 5
	// !
	PkgCondNot = 6
	// ~
	PkgCondAnyRevision = 7
	// =<pkg>*
	PkgCondMatchVersion = 8
)
View Source
const (
	RegexCatString     = `(^[a-z]+[0-9]*[a-z]*[-]*[a-z]+[0-9]*[a-z]*|^virtual)`
	RegexPkgNameString = `([a-zA-Z]*[0-9a-zA-Z\.\-_]*[a-zA-Z0-9]+|[a-zA-Z\-]+[+]+[-]+[0-9a-zA-Z\.]*|[a-zA-Z\-]+[+]+)`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GentooPackage

type GentooPackage struct {
	Name          string `json:"name,omitempty"`
	Category      string `json:"category,omitempty"`
	Version       string `json:"version,omitempty"`
	VersionSuffix string `json:"version_suffix,omitempty"`
	VersionBuild  string `json:"version_build,omitempty"`
	Slot          string `json:"slot,omitempty"`
	Condition     PackageCond
	Repository    string   `json:"repository,omitempty"`
	UseFlags      []string `json:"use_flags,omitempty"`
	License       string   `json:"license,omitempty"`
}

func ParsePackageStr

func ParsePackageStr(pkg string) (*GentooPackage, error)

return category, package, version, slot, condition

func (*GentooPackage) Admit

func (p *GentooPackage) Admit(i *GentooPackage) (bool, error)

func (*GentooPackage) Equal added in v0.8.1

func (p *GentooPackage) Equal(i *GentooPackage) (bool, error)

func (*GentooPackage) GetP added in v0.4.1

func (p *GentooPackage) GetP() string

func (*GentooPackage) GetPF added in v0.4.1

func (p *GentooPackage) GetPF() string

func (*GentooPackage) GetPN added in v0.4.1

func (p *GentooPackage) GetPN() string

func (*GentooPackage) GetPV added in v0.4.1

func (p *GentooPackage) GetPV() string

func (*GentooPackage) GetPVR added in v0.4.1

func (p *GentooPackage) GetPVR() (ans string)

func (*GentooPackage) GetPackageName

func (p *GentooPackage) GetPackageName() (ans string)

func (*GentooPackage) GetPackageNameWithCond added in v0.8.1

func (p *GentooPackage) GetPackageNameWithCond() (ans string)

func (*GentooPackage) GetPackageNameWithSlot added in v0.8.1

func (p *GentooPackage) GetPackageNameWithSlot() (ans string)

func (*GentooPackage) GreaterThan added in v0.8.1

func (p *GentooPackage) GreaterThan(i *GentooPackage) (bool, error)

func (*GentooPackage) GreaterThanOrEqual added in v0.8.1

func (p *GentooPackage) GreaterThanOrEqual(i *GentooPackage) (bool, error)

func (*GentooPackage) LessThan added in v0.8.1

func (p *GentooPackage) LessThan(i *GentooPackage) (bool, error)

func (*GentooPackage) LessThanOrEqual added in v0.8.1

func (p *GentooPackage) LessThanOrEqual(i *GentooPackage) (bool, error)

func (*GentooPackage) OfPackage

func (p *GentooPackage) OfPackage(i *GentooPackage) (ans bool)

func (*GentooPackage) String

func (p *GentooPackage) String() string

type GentooPackageSorter added in v0.8.1

type GentooPackageSorter []GentooPackage

func (GentooPackageSorter) Len added in v0.8.1

func (p GentooPackageSorter) Len() int

func (GentooPackageSorter) Less added in v0.8.1

func (p GentooPackageSorter) Less(i, j int) bool

func (GentooPackageSorter) Swap added in v0.8.1

func (p GentooPackageSorter) Swap(i, j int)

type PackageCond

type PackageCond int

Package condition

func (PackageCond) Int added in v0.5.0

func (p PackageCond) Int() (ans int)

func (PackageCond) String added in v0.5.0

func (p PackageCond) String() (ans string)

Jump to

Keyboard shortcuts

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