Launcher items added via Ubuntu Software Center incorrectly point to the app-install desktop files rather than the actual installed desktop files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
Invalid
|
Undecided
|
Bilal Akhtar | ||
software-center (Ubuntu) |
Fix Released
|
High
|
Gary Lasker | ||
Precise |
Fix Released
|
High
|
Gary Lasker |
Bug Description
[TEST CASE]
The easiest way to insure that the Unity launcher is now pointing to the installed desktop file is to simply verify that the corresponding launcher icon is removed correctly after an application is uninstalled. Note that this test case is the same as that for bug 981488.
1. Launch the current Ubuntu Software Center in Precise.
2. Click the "Installed" toolbar button to access the list of installed applications.
3. Choose an installed application to remove (choose one for which there is a corresponding icon in the Unity launcher).
4. Click the "More Info" button.
5. In the details view for the application, click the "Remove" button and enter the password for the remove if prompted.
6. The uninstall process begins and the progress bar moves in Software Center.
7. At the end of the install process, verify that the corresponding icon in the Unity launcher has *not" been removed.
8. Close Ubuntu Software Center.
9. Update to both the software-center *and* unity packages in precise-proposed.
10. Repeat steps 1 through 6.
11. This time, at the end of the install process, verify that the corresponding icon in the Unity launcher is *removed*.
[REGRESSION POTENTIAL]
Risk of regression is very low. Just verifying that the correct icon is actually removed should be enough.
---
While investigating bug 925014, I made the discovery that Unity launcher items that are added during an application installation via the Ubuntu Software Center incorrectly point to the desktop files from the app-install-data package, in the directory:
/usr/
rather than the actual *installed* desktop files in:
/usr/
Note that the installed desktop files can be found in the /usr/share/
This appears to be a regression in a very recent release of Unity, as afaik this has worked correctly for quite a few cycles and also in Precise right up until the very final releases.
Note that we recently finished the remaining pieces of the implementation of the fully animated Unity launcher integration, as outlined in bug 761851, and it was as part of this work that this regression appears to have occurred.
You can refer to comment #7 of bug 761851 for details about the steps needed to determine the actual installed desktop file path. The Python code from Software Center that we used in past releases for this is as shown:
def convert_
""" returns the installed desktop file path that corresponds to the
given app-install-data file path, and will also check directly for
the desktop file that corresponds to a given pkgname.
"""
# "normal" case
installed_
if os.path.
return installed_
# next, try case where a subdirectory is encoded in the app-install
# desktop filename, e.g. kde4_soundkonve
installed_
if os.path.
return installed_
# lastly, just try checking directly for the desktop file based on the pkgname itself
if pkgname:
if os.path.
return installed_
logging.
return ""
---
Additional info from Dmitry Shachnev, duplicate bug 996690:
Some Unity Mail users reported that after installing Unity Mail via the Software Center,
- The quicklist is not translated
- The count badge is not shown
Trying to debug this issue, I've found out that when installing an application from the Software Center, the desktop file added to Unity launcher favorites is '/usr/share/
$ gsettings get com.canonical.
['nautilus.
I've temporarily added a workaround to Unity Mail that uses the desktop file from Unity.LauncherF
Obviously, this affects not only Unity Mail, but any other application in the Software Center.
Related branches
- Michael Vogt (community): Needs Fixing
- Matthew Paul Thomas: Needs Fixing
-
Diff: 308 lines (+83/-42)7 files modifiedsoftwarecenter/backend/installbackend_impl/aptd.py (+5/-3)
softwarecenter/backend/unitylauncher.py (+5/-5)
softwarecenter/enums.py (+3/-0)
softwarecenter/ui/gtk3/panes/availablepane.py (+47/-30)
softwarecenter/utils.py (+7/-1)
test/gtk3/test_unity_launcher_integration.py (+2/-2)
test/test_utils.py (+14/-1)
Changed in unity: | |
assignee: | nobody → Bilal Akhtar (bilalakhtar) |
status: | New → Confirmed |
description: | updated |
Changed in software-center (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Gary Lasker (gary-lasker) |
milestone: | none → precise-updates |
status: | Triaged → In Progress |
Changed in software-center (Ubuntu Precise): | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in software-center (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in software-center (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Note that this bug appears to be at least part of the cause of bug 925014, where purchased items are currently not added to the Unity launcher. In the Python code snippet above, it's the direct check for the desktop file based on the pkgname that was used previously to determine the installed desktop file for purchased items (as purchased items do not have a corresponding app-install-data entry).