On Tue, 7 Apr 2009, Graham Williams wrote:

I'm looking to close out some long outstanding wajig "bugs."

I'm thinking to close this one - perhaps its a wishlist? Or
would you have some suggested code to update?

As far as I can see it's a bug: wajig detail's documentation in wajig listcommands says:

detail         Provide a detailed description of package (describe -vv)

and as this bug says, it doesn't work for installed packages that aren't downloadable.

As the bug report says, wajig detail uses apt-cache dumpavail:

Performing: apt-cache dumpavail > /home/rrt/.wajig/mord/tmpm6CLul
No packages found from those known to be available or installed

I've suggested that if the call to apt-cache dumpavail fails, you use dpkg -S instead. What do you want me to do, write the code for you? Oh wait, this is free software...hang on...OK, the code already says:

# The package descriptions can either be in dpkg --status or in
# apt-cache dumpavail.  They are not in the latter if they are no longer
# available, so I really need to be checking both!

but it doesn't seem to practise what it preaches. I attach a minimal patch against commands.py from wajig 2.0.40 to call dpkg --status, and proceed to apt-cache only if that fails.

--
http://rrt.sc3d.org/ | Quidquid latine dictum sit, altum viditur (Anon)
--- commands.py.bak	2008-12-01 10:21:56.000000000 +0000
+++ commands.py	2009-04-07 16:24:58.000000000 +0100
@@ -221,6 +221,12 @@
             perform.execute("dpkg-deb --info %s" % f)
             print "="*72
             sys.stdout.flush()
+    l = package_names[:]
+    for p in l:
+        if perform.execute("dpkg --status %s" % p) == 0:
+            print "="*72
+            sys.stdout.flush()
+            package_names.remove(p)
     if package_names:
         packages = package_names
     else:

Reply via email to