Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 43231

Summary: [dev-lang/tcl-8.3]: manpages linked using hardlinks -- huge waste of diskspace after compression
Product: Gentoo Linux Reporter: bartron <bartron>
Component: New packagesAssignee: TCL/TK Project <tcltk>
Status: RESOLVED WONTFIX    
Severity: normal CC: jakub, ming
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Catgets patch that fixes locale problems (see comments)
New ebuild for man that uses the catgets patch

Description bartron 2004-02-28 15:30:44 UTC
More information: If a tcl manpage describes more than one command 
(the majority of pages in `man3' and `mann' do), hard links are used 
to link the additional names to the same page.  However...when the 
manpages are compressed later, hard links are broken (because of the 
way gzip works, it stores information about the uncompressed file as
part of the comressed file)... resulting in multiple compressed 
copies of the same content.  For instance, 

  OpenFileChnl.3.gz, Tcl_OpenFileChannel.3.gz, 
  Tcl_OpenCommandChannel.3.gz, Tcl_MakeFileChannel.3.gz, 
  Tcl_GetChannel.3.gz, Tcl_GetChannelNames.3.gz, 
  Tcl_GetChannelNamesEx.3.gz, Tcl_RegisterChannel.3.gz, 
  Tcl_UnregisterChannel.3.gz, Tcl_Close.3.gz, Tcl_ReadChars.3.gz, 
  Tcl_Read.3.gz, Tcl_GetsObj.3.gz, Tcl_Gets.3.gz, Tcl_WriteObj.3.gz, 
  Tcl_WriteChars.3.gz, Tcl_Write.3.gz, Tcl_Flush.3.gz, Tcl_Seek.3.gz, 
  Tcl_Tell.3.gz, Tcl_GetChannelOption.3.gz, 
  Tcl_SetChannelOption.3.gz, Tcl_Eof.3.gz, Tcl_InputBlocked.3.gz, 
  Tcl_InputBuffered.3.gz, Tcl_Ungets.3.gz
  
(26 different files) all uncompress to the exact same data.

  Solution: use symlinks instead (tcl's disk usage in `/usr/share/man'
drops from 3.2M to 814K).  The shortest (not necessarily the cleanest)
fix, 

--- tcl8.3.4/unix/mkLinks.orig
+++ tcl8.3.4/unix/mkLinks
@@ -15,6 +15,9 @@
 # The script takes one argument, which is the name of the directory
 # where the manual entries have been installed.

+set -e
+ln() { /bin/ln -sf "$@"; }
+
 if test $# != 1; then
     echo "Usage: mkLinks dir"
     exit 1
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2004-08-06 15:46:49 UTC
I'll take this one and hammer the kinks out.
Comment 2 Antti Mäkelä 2004-08-14 03:47:02 UTC
Created attachment 37405 [details, diff]
Catgets patch that fixes locale problems (see comments)
Comment 3 Antti Mäkelä 2004-08-14 03:47:26 UTC
Created attachment 37406 [details]
New ebuild for man that uses the catgets patch
Comment 4 Antti Mäkelä 2004-08-14 03:48:05 UTC
Comment on attachment 37405 [details, diff]
Catgets patch that fixes locale problems (see comments)

WTF, for some reason this got added into wrong bug. Crap.
Comment 5 Antti Mäkelä 2004-08-14 03:51:09 UTC
Sorry about three previous comments. I have *no* idea why my browser for some reason decided to submit those patches to this bug when they should have gone to #37778...And apparently I cannot delete these, either.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-08-11 11:52:30 UTC
*** Bug 43235 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-07-22 09:13:08 UTC
Is there anybody out there?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-01-21 14:56:53 UTC
dev-lang/tcl-8.3* removed from the tree.