After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 557227 - should (sym)link identical figures instead of copying them
should (sym)link identical figures instead of copying them
Status: RESOLVED FIXED
Product: gnome-doc-utils
Classification: Deprecated
Component: build utils
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-doc-utils maintainers
gnome-doc-utils maintainers
: 352405 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-21 11:46 UTC by Christian Persch
Modified: 2008-11-17 21:26 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
proposed patch (1.98 KB, patch)
2008-10-21 12:41 UTC, Christian Persch
needs-work Details | Review
updated patch adressing comment 2 (1.95 KB, patch)
2008-10-21 14:01 UTC, Christian Persch
accepted-commit_now Details | Review

Description Christian Persch 2008-10-21 11:46:01 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.
Comment 1 Christian Persch 2008-10-21 12:41:56 UTC
Created attachment 121008 [details] [review]
proposed patch
Comment 2 Shaun McCance 2008-10-21 13:47:35 UTC
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.
Comment 3 Christian Persch 2008-10-21 14:01:14 UTC
Created attachment 121016 [details] [review]
updated patch adressing comment 2

Tested with epiphany and seems to work fine.
Comment 4 Shaun McCance 2008-10-21 14:29:48 UTC
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?

Comment 5 Christian Persch 2008-10-21 20:11:40 UTC
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 ;-)
Comment 6 Shaun McCance 2008-10-21 22:39:19 UTC
All right.  The earlier we get this in, the more distro testing it gets.  Christian, please commit.
Comment 7 Christian Persch 2008-10-21 22:54:13 UTC
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
Comment 8 Claude Paroz 2008-11-17 21:26:57 UTC
*** Bug 352405 has been marked as a duplicate of this bug. ***