Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
TIP: How NOT no compress (tex)info files when emerging
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
katabami
n00b
n00b


Joined: 11 Jul 2009
Posts: 40

PostPosted: Sat May 15, 2010 4:07 am    Post subject: TIP: How NOT no compress (tex)info files when emerging Reply with quote

Files under /usr/share/info get compressed when installed. But it slows down browse and search. Here's how NOT to get them compressed:

Open the file /usr/lib/portage/bin/ebuild-helpers/prepinfo, and
comment out the last line, as:

Code:
# exec ecompressdir --queue "${infodir}"


To protect the file from change at portage update, edit /etc/make.conf, too [1]:

Code:
CONFIG_PROTECT="your/own/other/files /usr/lib/portage/bin/ebuild-helpers/prepinfo"

That's all!

Pro:
Speed is greatly reduced when reading and searching. I don't know if this matters for recent PCs, but I like it much.
Con:
Takes extra HDD space. Factor 5 is a good estimate.

[1]: If yours is amd64-mulitlib, then the path has to be /usr/lib64/....
Back to top
View user's profile Send private message
teika
n00b
n00b


Joined: 19 Feb 2011
Posts: 68
Location: japan

PostPosted: Mon Jul 16, 2012 9:28 am    Post subject: Reply with quote

The above trick is not sufficient for some ebuilds, like app-text/emacs; you have to edit the file ecompressdir, too. I've posted an update to the Gentoo Wiki Portage tips page.
_________________
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge: topic 865313
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 1012
Location: CET

PostPosted: Mon Jul 16, 2012 3:38 pm    Post subject: Reply with quote

Setting PORTAGE_COMPRESS="" in make.conf should do. See 'man make.conf' for more fine grained control.
Back to top
View user's profile Send private message
teika
n00b
n00b


Joined: 19 Feb 2011
Posts: 68
Location: japan

PostPosted: Wed Jul 18, 2012 1:03 am    Post subject: Reply with quote

Thanks, I didn't know it. I updated the wiki.

But I need this hack; I'd like to keep /usr/share/{man,share} compressed. And some info files, including emacs related ones, lack the suffix .info, so PORTAGE_COMPRESS_EXCLUDE_SUFFIXES doesn't work. Info files "emacs" and "elisp" are better to be plain, since they're big and compression greatly slows down searching.
_________________
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge: topic 865313
Back to top
View user's profile Send private message
sera
Developer
Developer


Joined: 29 Feb 2008
Posts: 1012
Location: CET

PostPosted: Wed Jul 18, 2012 9:41 am    Post subject: Reply with quote

Maybe you should request a PORTAGE_COMPRESS_EXCLUDE_PATHS then? Seems you are not the only one who wants to do this or similar.

Other things I probably should mention in this context are INSTALL_MASK for documentation you do not want in the first place and the possibility to use less cpu intensive compression like gzip.
Back to top
View user's profile Send private message
ulm
Developer
Developer


Joined: 04 Oct 2004
Posts: 70
Location: Mainz, Germany

PostPosted: Wed Jul 18, 2012 9:18 pm    Post subject: Reply with quote

Alternatively, you could use controllable compression and add the following code to /etc/portage/bashrc:
Code:
post_src_install() {
    case ${EAPI:-0} in
        0|1|2|3) ;;
        *) docompress -x /usr/share/info ;;
    esac
}

(Unfortunately, it will work for EAPI 4 only.)
Back to top
View user's profile Send private message
teika
n00b
n00b


Joined: 19 Feb 2011
Posts: 68
Location: japan

PostPosted: Wed Aug 08, 2012 9:29 am    Post subject: Reply with quote

Sorry, my last post to the Wiki page had a bug. I updated to a correct version. (The previous version left /usr/share/info.ecompress.dir for each package which install into /usr/share/info/ , resulting in file collision.)

# Anyway none complained, so none has tried, right? =P

@Sera and ulm: Thanks for your info.
_________________
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge: topic 865313
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum