Re: dpkg-checkbuilddeps to generate a frontend friendly package list
> ]] George Danchev
>
> | I fixed some bugs with my previous patch, and now the new one is found at
> | [1]. Unfortunately, I also found that I erroneously believed that AptPkg
> | is only loaded run-time, which is not true and I will need to find ways
> | to tackle that as well. For the time being, libapt-pkg-perl is need, but
> | the apt cache is only loaded when the -f option is used, and not with -s.
> | You can see that is you comment $_config->{quiet} = 2;
>
> Use something like
>
> eval {
> require AptPkg::Config;
> import AptPkg::Config '$_config';
> require AptPkg::System;
> import AptPkg::System '$_system';
> require AptPkg::Cache;
> require AptPkg::Version;
> };
> if ($@) {
> die "libapt-pkg-perl not available, can't use -f";
> }
>
> to do the check at run-time.
That was helpful. Immediately after that, since $_system and $_config are only
defined if AptPkg is used I also had to add:
eval {
no strict;
no warnings;
$_config->init;
$_config->{quiet} = 2;
$_system = $_config->system;
$_sysver = $_system->versioning;
$_cache = AptPkg::Cache->new;
use warnings;
use strict;
};
if ($@) {
die "failed to initialize AptPkg.\n";
}
my third attempt is found at:
http://people.debian.org/~danchev/dpkg/frontend3.patch
--
pub 4096R/0E4BD0AB <people.fccf.net/danchev/key pgp.mit.edu>
Reply to: