[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:

> among the paramenters of update-menus, there is one that do not read
> /usr/lib/menu stuff, but only ~/.menu/, I do not know if it does what we
> want, I think so.
> update-menus --nodefaultdirs --menufiledir ~/.menu/
> should update only menus in ~/.menu, try -v for verbose output.
> I cannot test it now, but it quicker then the simply "update-menus".
Hopefully this works nicely with all WMs.  BTW, the Gnome menu seems
to remain untouched by update-menus (I guess KDE works - why should it
have trown errors else).

> A temporary (the quickest) solution is surely use /bin/su.
> Could you do it in postinst instead of in cdd-update-menus?
> you could do something like:
> --------
> source /etc/cdd/cdd.conf
> source /etc/cdd/men/med.conf # if present
> for ROLE in `getCDDRoleList med`; do
> 	for CDDUSER in `getUsersInRole med ${ROLE}`; do
> 		su ${CDDUSER} -c "update-menus"
> 	done
> done
> --------
> it should work, updateing menus for any user covering a role in med CDD.
> anyway, it's the same code from updateCDD in share/cdd/cdd-update-menus
> obviously cdd.conf and med.conf have to be present before the code
> execution.
I'm unsure whether we should provide such a "do-the-dirty-work-script"
in /usr/share/cdd/cdd-update-user-menus or whether I should put it into
med-common. The rationale for putting this into cdd-common is:

   - I'm using the post{inst,rm} scripts from cdd-dev templates and
     thus it should know the scripts which are called from here.
   - Other CDDs might like to use this trick for the time beeing
     as well.  (Any comments here????)

On the other hand /etc/cdd/med/med.conf could define a "postinst-helper"
script which could be run from a general post{inst,rm} script and might
be void for other CDDs.

Kind regards


Reply to: