解析:
使用中的模块libdpkg-perl
(dpkg-checkbuilddeps
内部使用这些模块)
将以下行添加到源程序包根目录print-build-deps
并print-build-deps
在其运行。
#!/usr/bin/perl
use strict;
use warnings;
use Dpkg::Control::Info;
use Dpkg::Deps;
my $control = Dpkg::Control::Info->new();
my $fields = $control->get_source();
my $build_depends = deps_parse($fields->{'Build-Depends'});
print deps_concat($build_depends) . "\n";
也可以看看:
perldoc Dpkg::Control::Info
perldoc Dpkg::Deps
安装:
您可以使用mk-build-deps
从devscripts
:
apt-get install devscripts
apt-get install equivs
cd project-root # project-root contains debian/control
mk-build-deps -i
man mk-build-deps
说:
mk-build-deps - build a package satisfying a package's build-dependencies
-i, --install
Install the generated packages and its build-dependencies
dpkg-checkbuilddeps
仅输出未满足的构建依赖项。请参阅我的常见解析答案。