Question on libapt-pkg-dev changes in 2.5.0
Hi apt team,
A while back I wrote a small interface from R to apt, using libapt-pkg-dev
(and Rcpp for the R/C++ glue).
It is a package in the R ecosystem and on CRAN.
Now, as of version 2.5.0, it stopped compiling because
In file included from buildDepends.cpp:26:
In file included from /usr/include/apt-pkg/debsrcrecords.h:14:
In file included from /usr/include/apt-pkg/srcrecords.h:15:
/usr/include/apt-pkg/hashes.h:19:10: fatal error: 'apt-pkg/tagfile-keys.h' file not found
#include <apt-pkg/tagfile-keys.h>
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
I can work around the 'fail to compile' issue by no longer (unconditionally)
compiling that file buildDepends. But I would of course like to restore the
ability to browse (source) dependencies and reverse dependencies. Is still
supported? I see in your changelog that
* Document tagfile-keys.h as internal to apt
but am a little confused that debsrcrecords.h has an unconditional
#include <apt-pkg/tagfile-keys.h>
Is there a reference or test client which retrieves this info under the
updated API? In essence I 'just' do (in R) something like this for a
function returning build-depends
buildDepends("^apt$")
> v <- buildDepends("^apt$")
> v[1:10]
[1] "cmake" "debhelper-compat"
[3] "docbook-xml" "docbook-xsl"
[5] "dpkg-dev" "gettext"
[7] "googletest" "libgtest-dev"
[9] "libbz2-dev" "libdb-dev"
>
which returns a std::vector<std::string> of package names, and similarly a
dumper of source record
> res <- capture.output( showSrc("^apt$") )
> res[1:4]
[1] "--apt"
[2] "Package: apt"
[3] "Format: 3.0 (native)"
[4] "Binary: apt, libapt-pkg6.0, apt-doc, libapt-pkg-dev, libapt-pkg-doc, apt-utils, apt-transport-https"
>
where here I just capture the stdout to filter it.
My (now repaired to allow compilation) code is here
https://github.com/eddelbuettel/rcppapt/blob/master/src/buildDepends.cpp
and you can see that there is not _that_ much going -- just collecting
vectors of result strings, really -- but I would need to know which data
structure to access.
I can switch from 'debsrcrecord.h' to 'srcrecords.h' but how I replace
debSrcRecordParser which only seems to be defined in debsrcrecords.h which I
can no longer include.
I may just be missing a small nudge so any help would be appreciated.
Cheers, Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd@debian.org
Reply to: