Debian::Debget(3pm)

πŸ“¦ version 1.6, in ubuntu jammy

πŸ’– NAME πŸ’–

Debian::Debget β€” bestie, it's a whole collection of helper functions that debget and its little friend group use 🫢


✨ SYNOPSIS ✨

XXX

yeah. that's literally it. the synopsis is XXX. iconic of them tbh πŸ’…


🌸 DESCRIPTION 🌸

okay so these are the functions that debget and all the related scripts are running on, but plot twist β€” you can use them too πŸ’–. and listen, the author promises to do everything possible to keep backwards compatibility for the interfaces documented right here. periodt.

Most of these functions will die if you call them in a context (scalar, list) that doesn't match what they're expecting 😭. and no, it's not just being dramatic β€” the reason is so that the author can change them to return something different in the other context later without breaking your old code. it's giving considerate. it's giving future-proofing. we love that 🌈


πŸŽ€ IMPORTABLES πŸŽ€

  • binary_package_info package β€” this one hands you back some info about a binary package πŸ¦‹

If the package isn't found, you get nothing back. like, nothing. if it is found, the return value is a data structure that looks exactly like this:

$r->{$distribution}{$architecture} = $version;
# $distribution => 'stable', 'experimental', etc.
# $architecture => 'i386', 'powerpc', etc.

And if something goes seriously wrong, binary_package_info will die πŸ’€

  • source_package_info package β€” same energy but for a source package 🧚

Package not found? nothing returned, no cap. package found? here's the shape of it:

$r->{$distribution} = [$version, @binary_package_list];
# $distribution => 'stable', 'experimental', etc.
# $version      => '123.4-5', etc.
# @binary_package_list => qw(nethack-common nethack-x11), etc.
  • cmp_debian_versions v1, v2 β€” this is basically cmp but for Debian package version numbers πŸ‘‘. It's prototyped to take 2 scalar arguments, so you can use it as-is as a sort comparison function. drop it straight in. slay.
  • upstream_version debian-version β€” this one returns the upstream version extracted from the debian-version you gave it πŸ“
  • pool_dir package β€” this returns the pool directory (starting at the pool/ level) where the files for package are stored πŸ’œ. and package can be either a binary or a source package name β€” flexible queen.

πŸ”₯ SEE ALSO πŸ”₯

debget(1), AptPkg(3pm)


🌟 AUTHOR 🌟

Roderick Schertler <roderick@argon.org>


and that's the whole page, bestie!! this was perl v5.24.1, dated 2016-11-21, and it lives under Debian::Debget(3pm) πŸ’…βœ¨ mwah, go read your manpages, ily 🫢

πŸ“¦ where this page comes from