Config...endency(3pm)

πŸ’– Config::Model::Dpkg::Dependency β€” the manual, but make it make sense

okay bestie, gather round, because this is Config::Model::Dpkg::Dependency, a Perl module that lives in the Config...endency(3pm) corner of your friendly neighbourhood User Contributed Perl Documentation. Its whole job? Checking Debian dependency declarations so you don't ship a control file that makes the archive sad. πŸŽ€


✨ NAME ✨

Config::Model::Dpkg::Dependency β€” Checks Debian dependency declarations. that's it, that's the gig. πŸ¦‹


✨ SYNOPSIS ✨

here's the whole vibe in code, literally copy-paste-able:

use Config::Model ;
use Log::Log4perl qw(:easy) ;
use Data::Dumper ;

Log::Log4perl->easy_init($WARN);

# define configuration tree object
my $model = Config::Model->new ;
$model ->create_config_class (
   name => "MyClass",
   element => [
       Depends => {
           'type'       => 'leaf',
           'value_type' => 'uniline',
           class => 'Config::Model::Dpkg::Dependency',
       },
   ],
) ;

my $inst = $model->instance(root_class_name => 'MyClass' );

my $root = $inst->config_root ;

$root->load( 'Depends="libc6 ( >= 1.0 )"') ;
# Connecting to qa.debian.org to check libc6 versions. Please wait ...
# Warning in 'Depends' value 'libc6 ( >= 1.0 )': unnecessary
# versioned dependency: >= 1.0. Debian has lenny-security ->
# 2.7-18lenny6; lenny -> 2.7-18lenny7; squeeze-security ->
# 2.11.2-6+squeeze1; squeeze -> 2.11.2-10; wheezy -> 2.11.2-10; sid
# -> 2.11.2-10; sid -> 2.11.2-11;

see that warning down there? that's not a bug, that's the module doing its whole job and telling you that >= 1.0 is doing absolutely nothing for you. πŸ’…


✨ DESCRIPTION ✨

so this class is derived from Config::Model::Value (yes, it's giving nepo baby but make it useful 🌸). Its purpose is to check the value of a Debian package dependency for the following stuff:

  • syntax as described in http://www.debian.org/doc/debian-policy/ch-relationships.html
  • Whether the version specified with > or >= is actually necessary. This module checks with the Debian server whether older versions can be found in Debian old-stable or not. If no older version can be found, a warning is issued (unless the package is known or calculated to be virtual). so it's lowkey snitching on your over-specific deps, and honestly? deserved. πŸ‘‘
  • Whether a Perl library is dual life. When that's the case, the dependency is checked according to Debian Perl policy http://pkg-perl.alioth.debian.org/policy.html#debian_control_handling. Because Debian auto-build systems (buildd) will use the first available alternative, the dependency should be in the form:
    • perl (>= 5.10.1) | libtest-simple-perl (>= 0.88) when the required perl version is available in sid. ".
    • libcpan-meta-perl | perl (>= 5.13.10) when the Perl version is not available in sid
fr fr, the order of the alternatives is load-bearing here. buildd grabs the first one it can, so you better put the right one first. πŸ”₯

πŸ—„οΈ Cache

Queries to Debian server are cached in ~/.config_model_depend_cache for about one month. so it's not gonna spam the server every single time you re-run it, we're being polite. πŸ’œ


πŸ’€ BUGS πŸ’€

not me listing the flaws, we love transparency:

  • Dependencies containing variables (e.g. "${foo}") are accepted as-is. No check are performed. like, zero checks. it just lets them through. 😭
  • Virtual package names are found scanning local apt cache. Hence an unknown package on your system may be a virtual package on another system. so like, your machine's ignorance is not universal truth, bestie. πŸ™ˆ
  • More advanced checks can probably be implemented. The author is open to new ideas. He's even more open to patches (with tests). with tests!! say it with me: WITH. TESTS. ✨

πŸ‘‘ AUTHOR πŸ‘‘

Dominique Dumont, ddumont [AT] cpan [DOT] org β€” we stan. 🫢


🌈 SEE ALSO 🌈

  • Config::Model
  • Config::Model::Value
  • Memoize
  • Memoize::Expire

(the two Memoize ones are the reason that cache statement in the DESCRIPTION hits so hard, iykyk 🧚)


okay that's the whole page, no cap β€” written for perl v5.42.3, dated 2026-08-30, and yes that is the same Config...endency(3pm) you came in with, just with way better energy now. go forth and declare your dependencies responsibly. πŸ’–βœ¨πŸŽ€πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from