[Solved] Re: [Debtags-devel] Any Idea why this fails?

Benjamin Mesing bensmail@gmx.net
Tue, 21 Sep 2004 17:27:54 +0200


Hello,

I do not know why, but the errors which occured do not appear anymore. I
have updated a range of packages lately so perhaps it has something to
do with this.
I have now released a new version with the nifty feature to hide facets
through the Plugin->Settings menu. This was something proposed by Enrico
some time ago. It is not on such a level, that the user is asked
non-technical questions about what he is interested in, but it is a
start. For this feature it is quite bad that the short description for
facets still simply returns the facet name. 
I would really much appreciate it, if you could give it a try, and tell
me what you think about it
(https://sourceforge.net/project/showfiles.php?group_id=106496).

When writing the application I realized that it would be quite useful if
PackageDB could offer the currently installed version of a package.
It is straightforward to implemente and I have allready included it in
my program. Here is the core of the code:

        // fetch the available version
        // look at the apt-cache.cc : bool DumpPackage function from the apt 
        // for more details
        pkgCache::PkgIterator Pkg = pCache->FindPkg(package);
        if (pkgCache::VerIterator currentVersion = Pkg.CurrentVer() )
        {
        	if ( !currentVersion.end() )
        	{
        		os << "<b>Installed Version</b>: " << currentVersion.VerStr() << "<br>";
        	}
        }

Feel free to use it if you like.

Greetings Ben