AptPkg...ecords(3pm)
π AptPkg::PkgRecords β the APT package description class π
okay bestie, welcome to AptPkg::PkgRecords, straight out of your User Contributed Perl Documentation π this is the module that lets you peek at the parsed tea inside package files, and honestly? it's giving very demure, very mindful, very APT.
β¨ NAME β¨
AptPkg::PkgRecords β the APT package description class π
πΈ SYNOPSIS πΈ
the whole vibe in one line, no notes:
use AptPkg::PkgRecords;
π¦ DESCRIPTION π¦
so basically, the AptPkg::PkgRecords module hands you an interface to the parsed contents of package files. that's the whole job. it parses, you read. slay. π
π AptPkg::PkgRecords
the AptPkg::PkgRecords package Implements the APT pkgRecords class. periodt.
and like, how do you even get one? you don't just conjure it out of thin air bestie β you fetch an instance of the AptPkg::PkgRecords class using the "packages" method from an AptPkg::Cache object. that's the portal. that's the door. okay? πͺβ¨
π Methods
lookup(PACK)β returns a hash (or a hash reference, depending on context, because Perl loves doing that π) for the given package.
and PACK can be any of these three things, your choice bestie:
- an
AptPkg::Cache::VerFileobject - an
AptPkg::Cache::DescFileobject - or just a package name
the hash it gives you back contains these keys, and yes, we're listing all of them, every single one, no skipping:
"FileName", "Checksum-FileSize", "MD5Hash", "SHA256",
"SourcePkg", "SourceVer", "Maintainer", "ShortDesc", "LongDesc"
and "Name".
and those values are taken from the packages or translation file. cute.
β οΈ real talk though:"LongDesc"is generally not useful forAptPkg::Cache::VerFileobjects, which refer to thePackagesfile β because those no longer contain the full description (it lives in theTranslationfiles now). so don't come for me when it's mid. π
and there's more! if PACK is a package name, these additional values get set too:
"Section" and "VerStr".
AND the following values get overridden with the translated versions:
"ShortDesc" and "LongDesc".
so yeah β pass a package name and you get the glow-up version. main character energy fr fr π
π SEE ALSO π
go read these too, they're part of the family:
π AUTHOR π
Brendan O'Dea <bod@debian.org> β the icon who wrote this. put some respect on the name π«Ά
that's the whole page bestie, you ate it up π
β¨ this was perl v5.42.3, dated 2026-08-19, and it's still giving AptPkg...ecords(3pm) energy. go forth and parse some package files, you've got this π¦πΈπ
π¦ where this page comes from
- ubuntu stonking: libapt-pkg-perl 0.1.43build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms