Bug 151977

Summary: Avoid packing icons repeatedly for every build
Product: LibreOffice Reporter: Hossein <hossein>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: cloph, michael.stahl, parisoplop, telesto, vmiklos
Priority: medium    
Version: 7.5.0.0 alpha0+   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description Hossein 2022-11-09 11:17:55 UTC
When trying to do 'make' on a previously built 'core' source ode folder, you will see that packing icons happen each time.

As Miklos said in the IRC discussion, this happens because we don't track the icon files in the Makefile, and without having a dependency tracking for these files, the icon packing should happen every time that you do a (re)build.

The solution should try to avoid doing the duplicate work of packing icons each time by using dependency tracking via Makefile.

This is an example output right now:

$ make
mkdir -p /home/hossein/Projects/libreoffice/core/instdir
/home/hossein/Projects/libreoffice/core/solenv/bin/install-gdb-printers -a /home/hossein/Projects/libreoffice/core/instdir -c
make -j 6  -rs -f /home/hossein/Projects/libreoffice/core/Makefile.gbuild build  
[PRL] CustomTarget/postprocess/images/commandimagelist.ilst
[ECH] CustomTarget/instsetoo_native/setup/setuprc
[ECH] CustomTarget/instsetoo_native/setup/versionrc
[PRL] CustomTarget/postprocess/images/sorted.lst
[CUS] instsetoo_native/setup
[PKG] instsetoo_native_setup
[LOC] top level modules: libreoffice
[BIN] instsetoo_native
[PRL] CustomTarget/postprocess/images/images_breeze.zip
[PRL] CustomTarget/postprocess/images/images_breeze_dark.zip
[PRL] CustomTarget/postprocess/images/images_breeze_dark_svg.zip
[PRL] CustomTarget/postprocess/images/images_breeze_svg.zip
[PRL] CustomTarget/postprocess/images/images_colibre.zip
[PRL] CustomTarget/postprocess/images/images_colibre_dark.zip
[PRL] CustomTarget/postprocess/images/images_colibre_dark_svg.zip
[PRL] CustomTarget/postprocess/images/images_colibre_svg.zip
[PRL] CustomTarget/postprocess/images/images_elementary.zip
[PRL] CustomTarget/postprocess/images/images_elementary_svg.zip
[PRL] CustomTarget/postprocess/images/images_karasa_jaga.zip
[PRL] CustomTarget/postprocess/images/images_karasa_jaga_svg.zip
[PRL] CustomTarget/postprocess/images/images_sifr.zip
[PRL] CustomTarget/postprocess/images/images_sifr_dark.zip
[PRL] CustomTarget/postprocess/images/images_sifr_dark_svg.zip
[PRL] CustomTarget/postprocess/images/images_sifr_svg.zip
[PRL] CustomTarget/postprocess/images/images_sukapura.zip
[PRL] CustomTarget/postprocess/images/images_sukapura_svg.zip
[MOD] instsetoo_native
[CUS] postprocess/images
[BIN] postprocess
[MOD] postprocess
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only
Comment 1 Stéphane Guillou (stragu) 2022-11-10 09:24:05 UTC
Marking as New as Miklos confirmed the issue on IRC.
Comment 2 Miklos Vajna 2022-11-10 10:17:34 UTC
I just confirmed that this is the reason for the status quo.

I'm not that sure if we want to change the status quo: not rebuilding all the time will mean each & every icon will have to be listed in a makefile (do we want that?) and also you'll need to explicitly handle deleted icons (so even if all input icons of a zip are up to date, we may still need to rebuild the zip as it contains deleted icons).

Do we want all this complexity?

Perhaps Michael S (CC'd) has an opinion on this.
Comment 3 Michael Stahl (allotropia) 2022-11-10 10:49:31 UTC
deleted icons aren't a big problem imho but also they can be handled easily by having the rule that creates the zip-file depend on the makefile.

then it's just the question if icon designers would be overly annoyed by having to edit a makefile whenever they work on the icons, which maybe you'd have to ask them.
Comment 4 Hossein 2022-12-14 08:00:07 UTC
Fixed by cloph. Thanks!

commit 0ff4b4a08deace66567d6248af9e41fc7336a1c1
Author: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Date:   Sat Dec 10 17:52:23 2022 +0100

    don't rebuild icon-themes if nothing changed
    
    Change-Id: I99ab68852d1f6e915a4cd92a4be2d28209e546ec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143934
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Comment 5 Christian Lohmaier 2022-12-14 19:59:39 UTC
ah, should have checked bugzilla before writing the commit message :-)