Bug 17456 - menu-cache 1.0.x: another problem with menu cache regeneration
Summary: menu-cache 1.0.x: another problem with menu cache regeneration
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory MGA5-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2016-01-06 15:43 CET by Nicolas Salguero
Modified: 2016-02-09 14:46 CET (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
An example to test the bug that will add an entry in "Office" section of the menu (124 bytes, application/x-desktop)
2016-02-08 14:25 CET, Nicolas Salguero
Details

Description Nicolas Salguero 2016-01-06 15:43:59 CET
I found another problem with menu cache regeneration: if the directory "$HOME/.local/share/applications" does not exist when you log into LXDE, then creating that directory and putting ".desktop" files in it does not refresh the menu (and only the menu because, when you try to add an application to a launch bar, the list of applications is updated).

I made a bug report on LXDE bug tracker: https://sourceforge.net/p/lxde/bugs/793/.
Nicolas Salguero 2016-01-06 15:44:25 CET

Whiteboard: (none) => MGA5TOO

Nicolas Salguero 2016-01-06 16:21:04 CET

Version: Cauldron => 5
Whiteboard: MGA5TOO => (none)

Comment 1 Nicolas Salguero 2016-01-06 16:22:41 CET
For Cauldron, pkg lxde-common-0.99.0-13.mga6 contains a fix
Comment 2 Nicolas Salguero 2016-01-06 16:27:51 CET
Suggested advisory:
========================

The updated lxde-common package corrects a problem with menu cache regeneration when the directory "$HOME/.local/share/applications" does not exist at the time the user logs into LXDE.
========================

Updated packages in core/updates_testing:
========================
i586:
lxde-common-0.99.0-9.2.mga5.noarch.rpm

x86_64:
lxde-common-0.99.0-9.2.mga5.noarch.rpm

Source RPMs:
lxde-common-0.99.0-9.2.mga5.src.rpm

Assignee: nicolas.salguero => qa-bugs

Nicolas Salguero 2016-01-08 09:47:42 CET

Summary: menu-cache 1.0.1: another problem with menu cache regeneration => menu-cache 1.0.x: another problem with menu cache regeneration

Comment 3 Nicolas Salguero 2016-01-08 09:53:25 CET
To complete the description:

In Cauldron, with version 1.0.1 of menu-cache, when you try to add an application to a launch bar, the list of applications is updated but, in Mga5, with version 1.0.0, neither the menu nor the list of applications are updated.
Dave Hodgins 2016-01-20 00:45:51 CET

CC: (none) => davidwhodgins
Whiteboard: (none) => advisory

Comment 4 Lewis Smith 2016-02-08 09:43:13 CET
@Nicolas
Preparing to test this, the description leaves me mystified. I have deleted the directory $HOME/.local/share/applications/ (which did contain an XFCE .desktop file), and am using LXDE desktop. "then creating that directory and putting .desktop files in it does not refresh the menu" leaves me mystified.

When you talk of 'menus', do you mean the main application launch menu; or the menus associated with Application Launch Bar Settings? Where is 'the list of applications' (Comment 3)? 

I have no idea what all this means: what are '.desktop files? Creating the directory & putting .desktop files [from where?] into it seems an obscure way of achieving something - what? Why should they add something to the menu, & which menu?

My LXDE desktop has 3 items, including:
 ./Desktop/org.lxde.home.desktop
 ./Desktop/org.lxde.trash.desktop
plus a shortcut, not listed, to a directory.

Please say in non-LXDE expert terms how to test this: to see the original fault - what to do, what to expect; then see its resolution. What sort of .desktop file to use, and from where. It must be very easy once understood. TIA

CC: (none) => lewyssmith

Comment 5 Nicolas Salguero 2016-02-08 14:25:01 CET
Created attachment 7425 [details]
An example to test the bug that will add an entry in "Office" section of the menu

(In reply to Lewis Smith from comment #4)
> @Nicolas
> Preparing to test this, the description leaves me mystified. I have deleted
> the directory $HOME/.local/share/applications/ (which did contain an XFCE
> .desktop file), and am using LXDE desktop. "then creating that directory and
> putting .desktop files in it does not refresh the menu" leaves me mystified.

Sorry if I was a bit confusing, I will try to explain more.

> When you talk of 'menus', do you mean the main application launch menu; or
> the menus associated with Application Launch Bar Settings? Where is 'the
> list of applications' (Comment 3)? 

I mean the two:
- the main application launch menu
- the menu associated with Application Launch Bar Settings, which is what I named 'the list of applications'.

> I have no idea what all this means: what are '.desktop files? Creating the
> directory & putting .desktop files [from where?] into it seems an obscure
> way of achieving something - what? Why should they add something to the
> menu, & which menu?

Some applications you can find on the web come with their own installers to allow a user to install them in his home directory and make them appear in the menu of a DE that respect Freedesktop specifications (here, LXDE).  An example is the SAP java client.  Other examples are windows applications that you install through wine.

Because the user that installs such an application has no write access to "/usr/share/applications", to be able to add the application to the menu, the installer has to write the file describing the new menu entry (i.e. a ".desktop" file) into the directory "$HOME/.local/share/applications".

> My LXDE desktop has 3 items, including:
>  ./Desktop/org.lxde.home.desktop
>  ./Desktop/org.lxde.trash.desktop
> plus a shortcut, not listed, to a directory.
> 
> Please say in non-LXDE expert terms how to test this: to see the original
> fault - what to do, what to expect; then see its resolution. What sort of
> .desktop file to use, and from where. It must be very easy once understood.
> TIA

So, to test the bug:
1) With the old version of lxde-common, make sure the directory "$HOME/.local/share/applications" does not exist then log into LXDE.
2) Create the directory "$HOME/.local/share/applications" and put the example ".desktop" file attached with this bug report in it.
3) In "Office" section of the two menus (the main application launch menu and the one associated with Application Launch Bar Settings), nothing appears.
4) Install the new version of lxde-common.
5) Remove the directory "$HOME/.local/share/applications".
6) Log out from LXDE.
7) Log into LXDE again.
8) See that the directory "$HOME/.local/share/applications" has been automatically created by the new version of lxde-common (because it did not exist at the time you logged into LXDE).
9) Put the example ".desktop" file attached with this bug report in the directory "$HOME/.local/share/applications".
10) In "Office" section of the two menus (the main application launch menu and the one associated with Application Launch Bar Settings), a new entry, named "Example to test mga#17456" appears.
Comment 6 Lewis Smith 2016-02-08 16:37:54 CET
Testing MGA5 x86 - OK

Nicolas: many thanks for:
- your rapid reply
- the example .desktop file
- generous explanation
all of which greatly facilitated testing this.

BEFORE the update [lxde-common-0.99.0-9.1.mga5]
Things were not quite as described...
1) It made no difference whether the $HOME/.local/share/applications/ directory already existed before login, or was created explicitly by the user during the session. The important point (re the update) is that LXDE did *not* create it automatically if it did not exist at login.
2) After placing the .desktop file into the directory:
- It, incorrectly, did NOT show up in the main application menu (re the update).
- However, it DID show up immediately in the Application Launcher Bar menu.

AFTER the update to lxde-common-0.99.0-9.2.mga5
1) If the directory $HOME/.local/share/applications/ does not already exist, LXDE now *creates it* automatically at login.
2) After placing the .desktop file into the directory:
- It DOES now show immediately in the main application menu.
- It continues to show up in the Application Launcher Bar menu.

I think the advisory needs correcting to something like:

Suggested advisory
==================
The updated lxde-common package corrects two problems related to menu cacheing and .desktop files (representing individually installed applications) not appearing in the main application menu:
When the directory "$HOME/.local/share/applications/" does not exist at the time the user logs in, LXDE now creates it automatically.
When an application .desktop file is placed in this directory, it immediately appears in the main application menu.
=====================================

Whiteboard: advisory => advisory MGA5-64-OK

Comment 7 claire robinson 2016-02-09 12:53:25 CET
Advisory updated as comment 6. Validating.

Please push to 5 updates, thanks.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 8 Mageia Robot 2016-02-09 14:46:22 CET
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0020.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.