tags 452801 patch
quit

Bill Allombert writes:


update-menus is not documented as handling virtual package.
I have no idea how to implement that

See attached patch ;)

or even if it is a good idea

I'm not sure too. However at least one package (gvim) would benefit from it.

The situation of /usr/share/menu/vim-gui-common is more complex:
There are several packages providing gvim and they can be installed
together. There are no reason to provide a menu entry for only one
of them, which is not even specified in the title.

All of the packages have similar (or even identical) functionality - this could be the reason.



Regards,
robert

--- update-menus.cc_	2007-07-10 19:23:12.000000000 +0200
+++ update-menus.cc	2008-01-21 21:03:52.000000000 +0100
@@ -435,7 +435,7 @@
 {
   // Here we get the list of *installed* packages from dpkg, using sed to
   // retrieve the package name.
-  char *pkgs = "dpkg-query --show --showformat='${status} ${package}\\n' | sed -n -e 's/.*installed *//p'";
+  char *pkgs = "dpkg-query --show --showformat='${status} ${provides} ${package}\\n' | sed -n -e '/installed /{s/^.*installed *//; s/[, ][, ]*/\\n/g; p}'";
   FILE *status = popen(pkgs, "r");
 
   if (!status)

Reply via email to