Documentation ¶
Index ¶
Constants ¶
View Source
const ( PropertyRepository = "arch.repository" PropertyArchitecture = "arch.architecture" PropertySignature = "arch.signature" PropertyMetadata = "arch.metadata" SettingKeyPrivate = "arch.key.private" SettingKeyPublic = "arch.key.public" RepositoryPackage = "_arch" RepositoryVersion = "_repository" AnyArch = "any" )
Variables ¶
View Source
var ( ErrMissingPKGINFOFile = util.NewInvalidArgumentErrorf(".PKGINFO file is missing") ErrUnsupportedFormat = util.NewInvalidArgumentErrorf("unsupported package container format") ErrInvalidName = util.NewInvalidArgumentErrorf("package name is invalid") ErrInvalidVersion = util.NewInvalidArgumentErrorf("package version is invalid") ErrInvalidArchitecture = util.NewInvalidArgumentErrorf("package architecture is invalid") )
Functions ¶
This section is empty.
Types ¶
type FileMetadata ¶
type FileMetadata struct { Architecture string `json:"architecture"` Base string `json:"base,omitempty"` InstalledSize int64 `json:"installed_size,omitempty"` BuildDate int64 `json:"build_date,omitempty"` Packager string `json:"packager,omitempty"` Groups []string `json:"groups,omitempty"` Provides []string `json:"provides,omitempty"` Replaces []string `json:"replaces,omitempty"` Depends []string `json:"depends,omitempty"` OptDepends []string `json:"opt_depends,omitempty"` MakeDepends []string `json:"make_depends,omitempty"` CheckDepends []string `json:"check_depends,omitempty"` Conflicts []string `json:"conflicts,omitempty"` XData []string `json:"xdata,omitempty"` Backup []string `json:"backup,omitempty"` Files []string `json:"files,omitempty"` }
type Package ¶
type Package struct { Name string Version string VersionMetadata VersionMetadata FileMetadata FileMetadata FileCompressionExtension string }
func ParsePackage ¶
ParsePackage parses an Arch package file
func ParsePackageInfo ¶
ParsePackageInfo parses a .PKGINFO file to retrieve the metadata https://man.archlinux.org/man/PKGBUILD.5 https://gitlab.archlinux.org/pacman/pacman/-/blob/master/lib/libalpm/be_package.c#L161
type VersionMetadata ¶
Click to show internal directories.
Click to hide internal directories.