Debian Bug report logs -
#231826
ratmenu: debian.apps.editors.menu bogus?
Reported by: Jorgen Schäfer <forcer@debian.org>
Date: Mon, 9 Feb 2004 04:18:02 UTC
Severity: normal
Fixed in version menu/2.1.26
Done: Bill Allombert <ballombe@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Jonathan Walther <krooger@debian.org>:
Bug#231826; Package ratmenu.
(full text, mbox, link).
Acknowledgement sent to Jorgen Schäfer <forcer@debian.org>:
New Bug report received and forwarded. Copy sent to Jonathan Walther <krooger@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: ratmenu
Version: 2.2-1
Severity: normal
My /etc/X11/ratmenu/debian.apps.editors.menu looks like this:
# Automatically generated file. Do not edit (see /usr/share/doc/menu/html/index.html)
"Emacs 21 (text)" "x-terminal-emulator -T \"Emacs 21 (text)\" -e /usr/bin/emacs21"ratmenu -style dreary -fg grey -bg blue -label "/Debian/Apps/Editors" -back /etc/X11/ratmenu/debian.apps.menu "Emacs 21 (X11)" "/usr/bin/emacs21" "Joe" "x-terminal-emulator -T \"Joe\" -e joe" "Openoffice.org From Template" "/usr/bin/oofromtemplate" "Openoffice.org HTML Document" "/usr/bin/ooweb" "Openoffice.org Writer" "/usr/bin/oowriter" "Vim" "x-terminal-emulator -T \"Vim\" -e /usr/bin/vim" "Xedit" "xedit"
see how late ratmenu is in that file?
(Sorry if that's a bug in Emacs 21)
Greetings,
-- Jorgen
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.24-1-k7
Locale: LANG=C, LC_CTYPE=de_DE@euro
Versions of packages ratmenu depends on:
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii xlibs 4.2.1-16 X Window System client libraries
-- no debconf information
Reply sent to Jonathan Walther <krooger@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Jorgen Schäfer <forcer@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #10 received at 231826-close@bugs.debian.org (full text, mbox, reply):
Source: ratmenu
Source-Version: 2.2-2
We believe that the bug you reported is fixed in the latest version of
ratmenu, which is due to be installed in the Debian FTP archive:
ratmenu_2.2-2.dsc
to pool/main/r/ratmenu/ratmenu_2.2-2.dsc
ratmenu_2.2-2.tar.gz
to pool/main/r/ratmenu/ratmenu_2.2-2.tar.gz
ratmenu_2.2-2_i386.deb
to pool/main/r/ratmenu/ratmenu_2.2-2_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 231826@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jonathan Walther <krooger@debian.org> (supplier of updated ratmenu package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Format: 1.7
Date: Sun, 30 Jan 2005 21:48:43 -0700
Source: ratmenu
Binary: ratmenu
Architecture: source i386
Version: 2.2-2
Distribution: unstable
Urgency: low
Maintainer: Jonathan Walther <krooger@debian.org>
Changed-By: Jonathan Walther <krooger@debian.org>
Description:
ratmenu - Creates X menus from the shell.
Closes: 231826 268541 277182 277267 277299
Changes:
ratmenu (2.2-2) unstable; urgency=low
.
* Fixed prerun and postrun syntax in menu method. Thank you Bill.
Closes: #277299
* menu method now marked as conffile. Thank you Bill. Closes: #277182
* Spell-corrected it's to its in control file. Thank you Kevin and Florian.
Closes: #268541, #277267
* Can't duplicate your error Jorgen. Reconfirm? Closes: #231826
* Bumped Standards-Version in control file up to 3.6.1.1
Files:
e4baf8790635a1902a069be3c49bd9ef 603 x11 optional ratmenu_2.2-2.dsc
f08928ced6b98e877353770178ecb576 12062 x11 optional ratmenu_2.2-2.tar.gz
1a210932fe47127aaf1350fccf527f10 13894 x11 optional ratmenu_2.2-2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iQCVAwUBQf3ZwsK9HT/YfGeBAQHVmAP/RApCAy/5cWABC83KJ0bicZ/YbvdhXpQj
sbJKaUcmZwZY8GozQ4CvdcsCCiaaMmClNUK8Pp3fGCkXMkEet5LvNieRQvxeGy6g
BuPWTgv3XnlINTA6sKEv4wRtIex6jj3kWTs8jKzaCdzD61fHdsPlIU4LDwEj6mp0
/KgMH2/Uqhg=
=7/ll
-----END PGP SIGNATURE-----
Information forwarded to debian-bugs-dist@lists.debian.org, Jonathan Walther <krooger@debian.org>:
Bug#231826; Package ratmenu.
(full text, mbox, link).
Acknowledgement sent to Jorgen Schaefer <forcer@debian.org>:
Extra info received and forwarded to list. Copy sent to Jonathan Walther <krooger@debian.org>.
(full text, mbox, link).
Message #15 received at 231826@bugs.debian.org (full text, mbox, reply):
Hi there,
thanks for the new upload. It didn't change anything, though. Even
after running update-menus, my
/etc/X11/ratmenu/debian.apps.editors.menu looks like this:
----
# Automatically generated file. Do not edit (see /usr/share/doc/menu/html/index.html)
"Emacs 21 (text)" "x-terminal-emulator -T \"Emacs 21 (text)\" -e /usr/bin/emacs21 -nw"ratmenu -style dreary -fg grey -bg blue -label "/Debian/Apps/Editors" -back /etc/X11/ratmenu/debian.apps.menu "Emacs 21 (X11)" "/usr/bin/emacs21" "Vim" "x-terminal-emulator -T \"Vim\" -e /usr/bin/vim" "Xedit" "xedit"
----
As you can see, it begins with the entry for Emacs 21 (text), and only
then has the call to "ratmenu -style dreary ..." which should come
first.
Greetings,
-- Jorgen
--
Debian GNU/Linux Developer
forcer@debian.org
http://www.forcix.cx/
Bug reopened, originator not changed.
Request was from Jonathan Walther <krooger@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Bug reassigned from package `ratmenu' to `menu'.
Request was from Jonathan Walther <krooger@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Bill Allombert <ballombe@debian.org>:
Bug#231826; Package menu.
(full text, mbox, link).
Acknowledgement sent to Daniel Brockman <daniel@brockman.se>:
Extra info received and forwarded to list. Copy sent to Bill Allombert <ballombe@debian.org>.
(full text, mbox, link).
Message #24 received at 231826@bugs.debian.org (full text, mbox, reply):
Bill, can you verify that this is a bug in menu itself,
rather than in ratmenu's application of menu?
If not, do you think you could help fix the ratmenu script?
I've tried to understand the menu language with little avail,
and it seems Jonathan cannot find any error in the script.
As it is, this bug is rendering ratmenu pretty useless.
Thanks,
--
Daniel Brockman <daniel@brockman.se>
Information forwarded to debian-bugs-dist@lists.debian.org, Bill Allombert <ballombe@debian.org>:
Bug#231826; Package menu.
(full text, mbox, link).
Acknowledgement sent to Bill Allombert <allomber@math.u-bordeaux.fr>:
Extra info received and forwarded to list. Copy sent to Bill Allombert <ballombe@debian.org>.
(full text, mbox, link).
Message #29 received at 231826@bugs.debian.org (full text, mbox, reply):
On Wed, Apr 13, 2005 at 02:47:32AM +0200, Daniel Brockman wrote:
> Bill, can you verify that this is a bug in menu itself,
> rather than in ratmenu's application of menu?
>
> If not, do you think you could help fix the ratmenu script?
> I've tried to understand the menu language with little avail,
> and it seems Jonathan cannot find any error in the script.
Neither can I. It looks like an awful race condition inside install-menu
but I am not sure. I need to investigate.
> As it is, this bug is rendering ratmenu pretty useless.
No way to change ratmenu to use a simpler menu format ?
Cheers,
--
Bill. <ballombe@debian.org>
Imagine a large red swirl here.
Information forwarded to debian-bugs-dist@lists.debian.org, Bill Allombert <ballombe@debian.org>:
Bug#231826; Package menu.
(full text, mbox, link).
Acknowledgement sent to Bill Allombert <allomber@math.u-bordeaux.fr>:
Extra info received and forwarded to list. Copy sent to Bill Allombert <ballombe@debian.org>.
(full text, mbox, link).
Message #34 received at 231826@bugs.debian.org (full text, mbox, reply):
On Wed, Apr 13, 2005 at 11:45:42AM +0200, Bill Allombert wrote:
> On Wed, Apr 13, 2005 at 02:47:32AM +0200, Daniel Brockman wrote:
> > Bill, can you verify that this is a bug in menu itself,
> > rather than in ratmenu's application of menu?
> >
> > If not, do you think you could help fix the ratmenu script?
> > I've tried to understand the menu language with little avail,
> > and it seems Jonathan cannot find any error in the script.
Hello Morten,
I more than suspect that the three install-menu functions
entryindex(), firstentry() and lastentry() do not work,
and that cause that bug.
Add entryindex() in the start function in the fvwm menu-methods,
like that:
function start($var,$com)=\
"+ \"" entryindex() " " escfirst(title(),$hotkey,"&") \
cond_surr(icon(),"%","%") "\" " $var " " $com "\n"
rerun menu, we get a ~/.fvwm/menudefs.hook file with menu like:
...
AddToMenu "/Debian/Apps/Games/Card" "Card" Title Top
+ "12 &aBridge" Exec exec /usr/bin/abridge
+ "0 &Canfield" /home/bill
x-terminal-emulator -T "Canfield" -e /usr/games/canfield
+ "2 C&ribbage" /home/bill
x-terminal-emulator -T "Cribbage" -e /usr/games/cribbage
+ "4 &Floater%/usr/share/pixmaps/floater-24.xpm%" Exec exec /usr/games/floater
+ "6 &Go Fish" /home/bill
x-terminal-emulator -T "Go Fish" -e sh -c '/usr/games/fish;echo;echo PRESS ENT+ "8 &Mille Bornes" /home/bill
x-terminal-emulator -T "Mille Bornes" -e /usr/games/mille
+ "10 &Xpatience2" Exec exec /usr/games/xpat2
There is 3 problems:
1) "0" is not the first entry, that break firstentry().
2) The numbers are all even.
3) They are not sorted.
Do you know if it is possible to fix this bug?
Cheers,
--
Bill. <ballombe@debian.org>
Imagine a large red swirl here.
Information forwarded to debian-bugs-dist@lists.debian.org, Bill Allombert <ballombe@debian.org>:
Bug#231826; Package menu.
(full text, mbox, link).
Acknowledgement sent to Bill Allombert <allomber@math.u-bordeaux.fr>:
Extra info received and forwarded to list. Copy sent to Bill Allombert <ballombe@debian.org>.
(full text, mbox, link).
Message #39 received at 231826@bugs.debian.org (full text, mbox, reply):
On Thu, Apr 14, 2005 at 11:34:40PM +0200, Bill Allombert wrote:
> On Wed, Apr 13, 2005 at 11:45:42AM +0200, Bill Allombert wrote:
> > On Wed, Apr 13, 2005 at 02:47:32AM +0200, Daniel Brockman wrote:
> > > Bill, can you verify that this is a bug in menu itself,
> > > rather than in ratmenu's application of menu?
> > >
> > > If not, do you think you could help fix the ratmenu script?
> > > I've tried to understand the menu language with little avail,
> > > and it seems Jonathan cannot find any error in the script.
>
> Hello Morten,
>
> I more than suspect that the three install-menu functions
> entryindex(), firstentry() and lastentry() do not work,
> and that cause that bug.
>
> Add entryindex() in the start function in the fvwm menu-methods,
> like that:
> function start($var,$com)=\
> "+ \"" entryindex() " " escfirst(title(),$hotkey,"&") \
> cond_surr(icon(),"%","%") "\" " $var " " $com "\n"
>
> rerun menu, we get a ~/.fvwm/menudefs.hook file with menu like:
> ...
> AddToMenu "/Debian/Apps/Games/Card" "Card" Title Top
> + "12 &aBridge" Exec exec /usr/bin/abridge
> + "0 &Canfield" /home/bill
> x-terminal-emulator -T "Canfield" -e /usr/games/canfield
> + "2 C&ribbage" /home/bill
> x-terminal-emulator -T "Cribbage" -e /usr/games/cribbage
> + "4 &Floater%/usr/share/pixmaps/floater-24.xpm%" Exec exec /usr/games/floater
> + "6 &Go Fish" /home/bill
> x-terminal-emulator -T "Go Fish" -e sh -c '/usr/games/fish;echo;echo PRESS ENT+ "8 &Mille Bornes" /home/bill
> x-terminal-emulator -T "Mille Bornes" -e /usr/games/mille
> + "10 &Xpatience2" Exec exec /usr/games/xpat2
>
> There is 3 problems:
> 1) "0" is not the first entry, that break firstentry().
> 2) The numbers are all even.
> 3) They are not sorted.
OK, so apparently the index is computed in menuentry::postprocess()
before the menu is sorted, that is why aBridge is first.
(It is last in ASCII order, but first after ucfirst()).
Here a patch that should fix the issue. Sorry it took so long...
Morten, could you check if I follow the C++ usage ?
Cheers,
--
Bill. <ballombe@debian.org>
Imagine a large red swirl here.
--- menu-2.1.25/install-menu/menu-tree.cc 2004-09-26 11:38:00.000000000 +0200
+++ menu-2.1.26/install-menu/menu-tree.cc 2005-09-24 22:32:05.000000000 +0200
@@ -254,6 +254,9 @@
sorted.insert(std::pair<string, menuentry *>(s, sub_i->second));
}
+ int index = 0;
+ for (i = sorted.begin(); i != sorted.end(); ++i)
+ i->second->vars[PRIVATE_ENTRYINDEX_VAR] = itostring(index++);
// Output the menu according to the treewalk variable.
for (string::size_type j = 0; j < treew.length(); ++j)
@@ -432,7 +435,6 @@
void menuentry::postprocess(int n_parent, int level, const std::string& prev_section)
{
submenu_container::iterator i, i_next;
- int index = 0;
vars[PRIVATE_LEVEL_VAR] = itostring(level);
@@ -440,7 +442,7 @@
if (!level)
vars[SECTION_VAR] = prev_section;
- for (i = submenus.begin(); i != submenus.end(); ++index)
+ for (i = submenus.begin(); i != submenus.end();)
{
i_next=i;
i_next++;
@@ -456,8 +458,6 @@
// is useful when for example the title is "Foo version/456".
me->vars[BASESECTION_VAR] = newsection.substr(0, newsection.rfind(me->vars[TITLE_VAR]) - 1);
- me->vars[PRIVATE_ENTRYINDEX_VAR] = itostring(index);
-
if (!me->submenus.empty())
me->postprocess(submenus.size(), level+1, newsection);
@@ -468,7 +468,6 @@
// This is an empty menu (without comand or submenus), so delete it.
submenus.erase(i);
- index--;
} else {
i->second->vars[PRIVATE_ENTRYCOUNT_VAR] = itostring(submenus.size());
i->second->vars[PRIVATE_LEVEL_VAR] = itostring(level+1);
@@ -476,7 +475,6 @@
}
// don't use i here any more, it may have been erased above
i = i_next; // don't do i++, as *i now may not be defined
- index++;
}
generate_hotkeys();
Reply sent to Bill Allombert <ballombe@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Jorgen Schäfer <forcer@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #44 received at 231826-close@bugs.debian.org (full text, mbox, reply):
Source: menu
Source-Version: 2.1.26
We believe that the bug you reported is fixed in the latest version of
menu, which is due to be installed in the Debian FTP archive:
menu_2.1.26.dsc
to pool/main/m/menu/menu_2.1.26.dsc
menu_2.1.26.tar.gz
to pool/main/m/menu/menu_2.1.26.tar.gz
menu_2.1.26_i386.deb
to pool/main/m/menu/menu_2.1.26_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 231826@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bill Allombert <ballombe@debian.org> (supplier of updated menu package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Tue, 4 Oct 2005 18:31:56 +0200
Source: menu
Binary: menu
Architecture: source i386
Version: 2.1.26
Distribution: unstable
Urgency: low
Maintainer: Bill Allombert <ballombe@debian.org>
Changed-By: Bill Allombert <ballombe@debian.org>
Description:
menu - generates programs menu for all menu-aware applications
Closes: 231826 315304 315841 328947 330182 331247
Changes:
menu (2.1.26) unstable; urgency=low
.
* The "And no, I'm not accepting job offers (2)" release.
* Menu-methods should now use #!/usr/bin/install-menu
* Fix update-menus counting of menuentries in verbose mode.
Closes: #315304. Thanks Shlomi Fish.
* Add Bulgarian menu sections translation. Thanks Yavor Doganov.
Closes: #315841.
* Add Slovak menu sections translation. Thanks Peter Mann.
Closes: #330182
* Bump Standards-Version to 3.6.2.
* debian/postinst, debian/prerm, debian/rules: Undivert update-menus.
* scripts/wm-menu-config, doc/wm-menu-config.8: removed.
* install-menu and su-to-root are now in /usr/bin and symlinks in
/usr/sbin.
* debian/copyright: update FSF address and bump copyright date.
* debian/menu.sgml: Fix typos, thanks Francesco Poli and
Miguel Gea Milvaques. Closes: #328947.
* debian/rules, debian/control, debian/conffiles:
+ Switch to debhelper v4.
+ Hack to prevent /etc/menu/README and /etc/menu-methods/README
to be marked as conffiles.
* update-menus was segfaulting on non-readable directories.
Closes: #331247. Thanks Felipe Almeida Lessa.
* The functions firstentry(), entryindex() and lastentry() did not work
when sorting was used. Closes: #231826. Thanks Jorgen Schäfer.
* Morten Brix Pedersen:
- Add missing virtual destructor to class 'func'.
Files:
e08c28c3821a72b0e6aba658aa316a76 521 admin optional menu_2.1.26.dsc
6aed1df5531d119f48ca63b5b317fd70 404873 admin optional menu_2.1.26.tar.gz
e229368eac3d34684f409c8f6c8834ea 383546 admin optional menu_2.1.26_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDQ+wUeDPs8bVESBURAvLHAJ98GYIv+HijojybhPVZXJbPKMqJZgCfWgHr
hLZx7UThOPGtOOsQKyOUkqc=
=cnSi
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 24 Jun 2007 23:33:45 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Dec 6 16:44:24 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.