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

Re: Bug in cdd-update-menus



On Tue, 20 Apr 2004, Cosimo Alfarano wrote:

> On Tue, Apr 20, 2004 at 10:10:18AM +0200, Andreas Tille wrote:
> > ~> ls -l /home/linux/.menu/cdd-menu
> > lrwxrwxrwx    1 root     linux          14 2004-04-20 09:43 /home/linux/.menu/cdd-menu -> /usr/share/cdd
>
> it's strange, works for me. I remove ~/.menu/, run cdd-update-menus.
Surely it is strange ... ;-)

I just removed the ~/.menu/cdd-menu links from both med users (linux, tillea)
and reinstalled med-tools which has the line

     cdd-update-menus -d med

in its postinst script.

~> sudo dpkg -i med-tools_0.7_all.deb
(Reading database ... 173854 files and directories currently installed.)
Preparing to replace med-tools 0.6 (using med-tools_0.7_all.deb) ...
Unpacking replacement med-tools ...
Removing package med-tools.
Updating menu script for all users in med CDD:
debug: getUsersInRole(): users covering role med for CDD med: linux tillea
Updating cdd-menu script for user linux
Updating cdd-menu script for user tillea
Setting up med-tools (0.7) ...
Installing package med-tools.
Updating menu script for all users in med CDD:
debug: getUsersInRole(): users covering role med for CDD med: linux tillea
Updating cdd-menu script for user linux
Updating cdd-menu script for user tillea
~> ls -l /home/tillea/.menu/ /home/linux/.menu/
/home/linux/.menu/:
total 0
lrwxrwxrwx    1 root     linux          14 Apr 20 11:24 cdd-menu -> /usr/share/cdd

/home/tillea/.menu/:
total 0
lrwxrwxrwx    1 root     admin          14 Apr 20 11:24 cdd-menu -> /usr/share/cdd


Now with DRYRUN:

~> sudo dpkg -i med-tools_0.7_all.deb
(Reading database ... 173854 files and directories currently installed.)
Preparing to replace med-tools 0.7 (using med-tools_0.7_all.deb) ...
Unpacking replacement med-tools ...
Removing package med-tools.
Updating menu script for all users in med CDD:
debug: getUsersInRole(): users covering role med for CDD med: linux tillea
Updating cdd-menu script for user linux
DRYRUN: rm -f /home/linux/.menu/cdd-menu
DRYRUN: ln -fs /usr/share/cdd /home/linux/.menu/cdd-menu
Updating cdd-menu script for user tillea
DRYRUN: rm -f /home/tillea/.menu/cdd-menu
DRYRUN: ln -fs /usr/share/cdd /home/tillea/.menu/cdd-menu
Setting up med-tools (0.7) ...
Installing package med-tools.
Updating menu script for all users in med CDD:
debug: getUsersInRole(): users covering role med for CDD med: linux tillea
Updating cdd-menu script for user linux
DRYRUN: rm -f /home/linux/.menu/cdd-menu
DRYRUN: ln -fs /usr/share/cdd /home/linux/.menu/cdd-menu
Updating cdd-menu script for user tillea
DRYRUN: rm -f /home/tillea/.menu/cdd-menu
DRYRUN: ln -fs /usr/share/cdd /home/tillea/.menu/cdd-menu


This is really strange because I'm pretty sure that I tried the DRYRUN feature
this morning and did a copy and past to create the right link.

> Yes, in the sense I'm aware of it and dicided to posticipate decision to
> include it in script.
> No problem to include it when called as user (not by root with -u), but
> I'd prefer to run it somewhere in /etc/X11/Xsession.d/ for example, and
> anywhere else it's needed. In this way is a CDD adds/removes menus form
> /etc/cdd/<CDD>, script update it as soon as it's needed.
"As soon as it's needed" is a nice concept. ;-)

I have no idea about X startup internals (you will be astonished about the
amount of stuff I have no idea about ;-) ).  When I builded the first Debian-Med
package my intention was to call update-menus in the package postinst script
for every med (now cdd) user.  This might be to much (would be enough to run it
in the end of an apt-get process (if there are more than one cdd- package
we could save some time).  But if we put this into /etc/X11/Xsession.d/
I guess it will be every time when X is started which leads to a slowdown
of X startup, IMHO.  But as I said - if this is the normal (tm) way to
handle update-menu mechanism for users it is really fine for me.

I have only to remember that I have to do an update-menus and restart my WM
for testing purposes.

Kind regards

        Andreas.



Reply to: