[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Help with libapt-pkg



Hello,

I'm stuck with libdebtags development and I need some help wrt
libapt-pkg.

For some functionality like some strategies of the search function, I
need to iterate through the whole package archive.  In the past I
couldn't see an obvious way of doing it with libapt-pkg and I did it
just parsing the 'available' file, but today I discovered that it gets
out of sync with APT and I would like to finally use libapt-pkg for it.

I looked at the Search function in apt-cache.cc but didn't understand
much of it.  What I'd like to do is seeing all package records (possibly
as pkgTagSection structures) one by one, in no particular order, and
possibly seeing the last version of it in order to have the most
recent metadata.  I'd also like to do it fast: sequentially scanning
"available" was pretty fast, but I suspect that iterating GCache and,
for every package, computing in what file it is and accessing the
resulting file is not going to be that efficient anymore.

Is there a better way to do it?

And in general, is there some place I can bother people, possibly on
IRC, if I need libapt-pkg help with debtags?


Ciao,

Enrico



Reply to: