Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241672 - Automatically symlinking identical GNOME user documentation figure pictures
Summary: Automatically symlinking identical GNOME user documentation figure pictures
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All All
: Lowest enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 00:53 UTC by Mart Raudsepp
Modified: 2012-11-04 12:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2008-10-13 00:53:11 UTC
I'm filing a few ideas away as bugs, so they don't rot in just my head and TODO files.

Many GNOME applications user documentation translations (gnome-doc-utils infrastructure iirc) initially copy the screenshots and figures from the main C/english documentation and often don't take a localized screenshot and it remains as the English one. Hence they are sometimes byte equal, and we could tweak the "translated" figure to be a symlink to the main one instead, saving space on user systems - most importantly there should be some savings for a LiveCD situation.

Of course all this needs investigation -- how many pictures actually are equal, how does it work out, where to do the symlinking, how to automate it, is it worth it, etc...
This is one trick that RedHat/Fedora people do for their LiveCD's, as heard from a Red Hat developer.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-02-28 12:32:35 UTC
Actually, gnome-doc-utils-0.14 already does this it seems. However not all packages are using this version yet.

install-doc-figs:
	@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
	  for lc in C $(_DOC_REAL_LINGUAS); do \
	    figsymlink=false; \
	    if test -f "$$lc/$$fig"; then \
	      figfile="$$lc/$$fig"; \
	    elif test -f "$(srcdir)/$$lc/$$fig"; then \
	      figfile="$(srcdir)/$$lc/$$fig"; \
	    else \
	      figsymlink=true; \
	    fi; \
	    figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
	    figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
	    if ! test -d "$$figdir"; then \
	      echo "$(mkinstalldirs) $$figdir"; \
	      $(mkinstalldirs) "$$figdir"; \
	    fi; \
	    figbase=`echo $$fig | sed -e 's/^.*\///'`; \
	    if $$figsymlink; then \
	      echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
	      ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
	    else \
	      echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
	      $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
	    fi; \
	  done; \
	done
Comment 2 Mart Raudsepp gentoo-dev 2009-04-19 02:33:54 UTC
This code is there since gnome-doc-utils-0.14.1
Comment 3 Mart Raudsepp gentoo-dev 2009-04-19 04:32:41 UTC
I think this code works only if the translators haven't added copies of english ones already, doesn't it?
Like many packages user doc translations already copy english figures without having them updated, and I don't think those will be killed automatically and replaced with symlinks. Didn't digest through that bash code all that much though.
But yeah, the bottom-line is that the mechanisms are there in gnome-doc-utils to do it right, but just packages need to use a new enough version, and possibly delete the figures that are mere identical copies of the C locale (american english) figures.
Comment 4 Pacho Ramos gentoo-dev 2011-02-04 09:41:44 UTC
(In reply to comment #2)
> This code is there since gnome-doc-utils-0.14.1
> 

Well, that version is pretty old, how could we see what packages are still using older version than that?
Comment 5 Pacho Ramos gentoo-dev 2011-12-17 13:50:35 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > This code is there since gnome-doc-utils-0.14.1
> > 
> 
> Well, that version is pretty old, how could we see what packages are still
> using older version than that?

What do we need to do related with this problem now that new enough gnome-doc-utils is around for a long time? Thanks
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-11-04 12:18:32 UTC
I think we can just close this bug as obsolete.