GNOME Bugzilla – Bug 557227
should (sym)link identical figures instead of copying them
Last modified: 2008-11-17 21:26:57 UTC
E.g. let's look at epiphany's installed docs: $prefix/share/gnome/help/epiphany/{C,ca,cs,en_GB,oc,ru}/figures/ephy-screenshot.png are identical files since those locales don't provide this figure in a localised variant; but they are not symlinks nor hard links to the C/ one, but copies, so taking up 5x more space than necessary.
Created attachment 121008 [details] [review] proposed patch
This doesn't seem right: ( cd "$$figdir" && $(LN_S) -f "../../$$figfile" "$$figbase" ); \ $figfile is the path to the file in the build layout, not the install layout. This can be different when the file gets taken from $(srcdir), i.e. when this line runs: figfile="$(srcdir)/C/$$fig"; I think you could reliably just link to "../C/$$fig", but it needs testing.
Created attachment 121016 [details] [review] updated patch adressing comment 2 Tested with epiphany and seems to work fine.
Great, thanks. This is a nice space-saver. INSTALL_DATA will overwrite a symlink, right? We don't want the symlink to get in the way of future localized versions of the figure. Will this cause any problems for any of the common packaging formats?
install will indeed overwrite a symlink: $ touch a $ ln -s a b $ ls -F a b@ $ install a b $ ls -F a b I spoke with seb128, and it's no problem: <seb128> chpe: that's not likely to create any deb issue no, we already do that in ubuntu in fact during the build ;-)
All right. The earlier we get this in, the more distro testing it gets. Christian, please commit.
I also added a AC_PROG_LN_S call to configure since gdu itself doesn't use GNOME_DOC_INIT. Committed. * tools/gnome-doc-utils.make: Save disk space by Symlinking the non-localised figures to the C figures instead of copying them. Bug #557227. * tools/gnome-doc-utils.m4: Require AC_PROG_LN_S. * configure.ac: Call AC_PROG_LN_S explicitly since g-d-u doesn't use
*** Bug 352405 has been marked as a duplicate of this bug. ***