GNOME Bugzilla – Bug 669529
Use PackageKit to install gnome-color-manager components on demand
Last modified: 2013-01-16 09:25:56 UTC
Created attachment 206951 [details] [review] Patch to install gcm tools on-demand The attached patch uses PackageKit's session installer interface to install the gcm-calibrate and gcm-viewer viewer binaries on demand. gnome-color-manager has a dependency on Argyll, which is roughly 30MB on-disc. Since most users will not have the hardware to use the calibrate button it seems reasonable to only install these components when needed. If it's easier to review I can also submit this as a smaller patch series, or as a git branch in gnome-control-center git.
Created attachment 206952 [details] [review] (Better) Patch to install gcm tools on-demand Whoops. That was an earlier version. A slightly cleaner patch is attached.
Patch looks okay (although some of the braces need fixing to match the coding style) but from a 30,000ft view I did this differently on Fedora. I included gnome-color-manager on the LiveCD and added code in gnome-color-manager to install argyllcms using PackageKit. This way means you get the gcm-import binary on the disk, which means you can double click .icc files to get them installed but without the 30Mb argyllcms. If you need to keep g-c-m off the disk for some reason, I guess the patch would be okay, but it seems like the wrong layer to split things to me.
We can't go installing every little thing "on-demand". Why is there a 30 megs dep on argyllcms? Is the size of that dependency likely to drop, or are there loads of data files which we won't be able to compress anyway? Has anyone looked at the impact of the "on-demand" installation with the workflow?
(In reply to comment #3) > Why is there a 30 megs dep on argyllcms? I had a look at this just now, and wow: ... 512K /usr/bin/ccttest 1.2M /usr/bin/ccxxmake 1.1M /usr/bin/chartread 688K /usr/bin/collink 944K /usr/bin/colprof ... Each binary is HUGE. We can probably split out a shared library for each tool to use and drop the size of each tool by a couple orders of magnitude. Richard.
I'm going to modify the Fedora spec file to ship a shared library to reduce the installed package size from 27.7Mb to 3.2Mb by removing 46 instances of static linking. I'm using my autotooled hargyllcms friendly fork to do this, as the native jam packaging is just batshit insane. Yell if you want me to explain how I did it.
(In reply to comment #2) > Patch looks okay (although some of the braces need fixing to match the coding > style) but from a 30,000ft view I did this differently on Fedora. I included > gnome-color-manager on the LiveCD and added code in gnome-color-manager to > install argyllcms using PackageKit. This way means you get the gcm-import > binary on the disk, which means you can double click .icc files to get them > installed but without the 30Mb argyllcms. Bah. I just plain didn't notice this. That's a reasonable place to put the installation logic. Is there any particular reason why you're using the install-named-packages interface rather than install-files? That would avoid the need to distro-patch. In other words, would you accept a patch to make it use the InstallProvideFiles interface? (In reply to comment #3) > Has anyone looked at the impact of the "on-demand" installation with the > workflow? Users clicking the "calibrate" button are already expecting 5-30 minutes worth of waiting while the calibration process is proceeding. I don't think a minute's wait while the requisite support is being installed before the first use is likely to be annoying.
(In reply to comment #6) > Is there any particular reason why you're using the install-named-packages > interface rather than install-files? That would avoid the need to > distro-patch. In other words, would you accept a patch to make it use the > InstallProvideFiles interface? Sure, that would be fine. In Fedora, I'll probably just include argyllcms on the CD now it's not huge.
(In reply to comment #5) > I'm using my autotooled hargyllcms friendly fork to do this, as the native jam > packaging is just batshit insane. Yell if you want me to explain how I did it. Pretty sure you thought about it and there is a reason, but anyway: Would it be possible to push it upstream? I'd like the same in Mageia. I don't need any explanation btw, I can look at the Fedora spec file :)
(In reply to comment #8) > Pretty sure you thought about it and there is a reason, but anyway: > Would it be possible to push it upstream? I'd like the same in Mageia. Upstream is happy with static binaries and the jam buildsystem, and won't accept patches for an alternate build system. See https://gitorious.org/hargyllcms/hargyllcms/blobs/master/README for all the kulge-tastic-ness.
Given the smaller installation size, do we really need on-demand installation? I'd say no, given how it impacts the workflow.
Please reopen if this is still a problem.
*** Bug 691825 has been marked as a duplicate of this bug. ***