pub struct PackageInfoV2 {Show 20 fields
pub pkgname: Name,
pub pkgbase: Name,
pub pkgver: FullVersion,
pub pkgdesc: PackageDescription,
pub url: Url,
pub builddate: BuildDate,
pub packager: Packager,
pub size: InstalledSize,
pub arch: Architecture,
pub license: Vec<License>,
pub replaces: Vec<PackageRelation>,
pub group: Vec<Group>,
pub conflict: Vec<PackageRelation>,
pub provides: Vec<RelationOrSoname>,
pub backup: Vec<Backup>,
pub depend: Vec<RelationOrSoname>,
pub optdepend: Vec<OptionalDependency>,
pub makedepend: Vec<PackageRelation>,
pub checkdepend: Vec<PackageRelation>,
pub xdata: ExtraData,
}Expand description
PKGINFO version 2
PackageInfoV2 is (exclusively) compatible with data following the v2 specification of the
PKGINFO file.
§Examples
use std::str::FromStr;
use alpm_pkginfo::PackageInfoV2;
let pkginfo_data = r#"pkgname = example
pkgbase = example
xdata = pkgtype=pkg
pkgver = 1:1.0.0-1
pkgdesc = A project that does something
url = https://example.org/
builddate = 1729181726
packager = John Doe <john@example.org>
size = 181849963
arch = any
license = GPL-3.0-or-later
license = LGPL-3.0-or-later
replaces = other-package>0.9.0-3
group = package-group
group = other-package-group
conflict = conflicting-package<1.0.0
conflict = other-conflicting-package<1.0.0
provides = some-component
provides = some-other-component=1:1.0.0-1
provides = libexample.so=1-64
provides = libunversionedexample.so=libunversionedexample.so-64
provides = lib:libexample.so.1
backup = etc/example/config.toml
backup = etc/example/other-config.txt
depend = glibc
depend = gcc-libs
depend = libother.so=0-64
depend = libunversioned.so=libunversioned.so-64
depend = lib:libother.so.0
optdepend = python: for special-python-script.py
optdepend = ruby: for special-ruby-script.rb
makedepend = cmake
makedepend = python-sphinx
checkdepend = extra-test-tool
checkdepend = other-extra-test-tool"#;
let pkginfo = PackageInfoV2::from_str(pkginfo_data)?;
assert_eq!(pkginfo.to_string(), pkginfo_data);Fields§
§pkgname: NameThe name of the package.
pkgbase: NameThe base name of the package.
pkgver: FullVersionThe version of the package.
pkgdesc: PackageDescriptionThe description of the package.
url: UrlThe URL of the package.
builddate: BuildDateThe build date of the package.
packager: PackagerThe packager of the package.
size: InstalledSizeThe size of the package.
arch: ArchitectureThe architecture of the package.
license: Vec<License>The licenses of the package.
replaces: Vec<PackageRelation>The packages this package replaces.
group: Vec<Group>The groups this package belongs to.
conflict: Vec<PackageRelation>The packages this package conflicts with.
provides: Vec<RelationOrSoname>The packages this package provides.
backup: Vec<Backup>The backup files of the package.
depend: Vec<RelationOrSoname>The dependencies of the package.
optdepend: Vec<OptionalDependency>The optional dependencies of the package.
makedepend: Vec<PackageRelation>The packages required to build this package.
checkdepend: Vec<PackageRelation>The packages this package is checked with.
xdata: ExtraDataExtra data of the package.
Trait Implementations§
Source§impl Clone for PackageInfoV2
impl Clone for PackageInfoV2
Source§fn clone(&self) -> PackageInfoV2
fn clone(&self) -> PackageInfoV2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more