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::VerFile object
  • an AptPkg::Cache::DescFile object
  • 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 for AptPkg::Cache::VerFile objects, which refer to the Packages file β€” because those no longer contain the full description (it lives in the Translation files 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