Bug 132737 - SVG icons are installed in fixed size locolor and hicolor theme subdirectories
Summary: SVG icons are installed in fixed size locolor and hicolor theme subdirectories
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://gerrit.libreoffice.org/c/core...
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 18:31 UTC by Chris Mayo
Modified: 2020-10-29 09:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2020-05-05 18:31:10 UTC
Description:
e.g.:
/usr/share/icons/hicolor/48x48/apps $ ls -w 60 libreoffice-*
libreoffice-base.png     libreoffice-impress.svg
libreoffice-base.svg     libreoffice-main.png
libreoffice-calc.png     libreoffice-main.svg
libreoffice-calc.svg     libreoffice-math.png
libreoffice-chart.png    libreoffice-math.svg
libreoffice-chart.svg    libreoffice-startcenter.png
libreoffice-draw.png     libreoffice-startcenter.svg
libreoffice-draw.svg     libreoffice-writer.png
libreoffice-impress.png  libreoffice-writer.svg

I would expect SVGs only in the scalable directory.


Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Chris Mayo 2020-05-05 18:34:45 UTC
A link showing the problem from Ubuntu 20.04:

https://packages.ubuntu.com/focal/all/libreoffice-common/filelist
Comment 2 Chris Mayo 2020-05-06 18:33:51 UTC
When compiling from source this can be fixed by removing the problem SVG files after unpacking the tarball with:

find sysui/desktop/icons/hicolor/ -name "*.svg" ! -path "*scalable*" -exec rm {} \;

I guess the repository could be cleaned up similarly.
Comment 3 Chris Mayo 2020-05-08 09:39:40 UTC
Also in locolor icon theme:

find sysui/desktop/icons/locolor/ -name "*.svg" ! -path "*scalable*" -exec rm {} \;

Submitted as:

https://gerrit.libreoffice.org/c/core/+/93711
Comment 4 Chris Mayo 2020-05-08 10:27:38 UTC
Looks more complicated than this, some of the SVGs are not duplicates, and what is in the scalable directories contain a range of sized images within one.
Comment 5 Rizal Muttaqin 2020-07-16 15:37:35 UTC
My take is move the scalable version under hicolor/scalable if possible. Not remove them. We would always need SVG files as a source for future update/refinement etc.

The problem is the scalable directory which a bunch of SVG files placed under does not contain any other directory like

hicolor/1024/apps or hicolor/apps/1024

This is should take into FreeDesktop specification which I have zero knowledge at.
Comment 6 Chris Mayo 2020-07-16 18:45:06 UTC
My new suggestion would be to leave the files where they are in the repository and modify sysui/desktop/share/create_tree.sh to install PNGs and SVGs separately - to allow only installing SVGs into a scalable directory.

Are the SVGs in scalable/mimetypes suitable for installation? They appear to include all the size variants in one file.
Comment 7 Chris Mayo 2020-07-25 15:19:00 UTC
I've created a patch that just doesn't install the SVG files, or locolor theme:

https://gerrit.libreoffice.org/c/core/+/99444
Comment 8 Commit Notification 2020-10-29 08:24:11 UTC
Chris Mayo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f9ddaae9caa5bfebf1b2d763751049125642657b

tdf#132737: Don't install SVG source icons or locolor theme

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.