View previous topic :: View next topic |
Author |
Message |
katabami n00b
Joined: 11 Jul 2009 Posts: 40
|
Posted: Sat May 15, 2010 4:07 am Post subject: TIP: How NOT no compress (tex)info files when emerging |
|
|
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 |
|
|
teika Apprentice
Joined: 19 Feb 2011 Posts: 155 Location: YYYY-MM-DD, period. Have you ever used the Internet?
|
Posted: Mon Jul 16, 2012 9:28 am Post subject: |
|
|
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. _________________ Hack of easy Shift / Ctrl / AltGr etc; save your pinkies, type without drudgery: topic 865313
XPAT - Xi, Putin, Abe and Trump - are security holes of their own nations. |
|
Back to top |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Mon Jul 16, 2012 3:38 pm Post subject: |
|
|
Setting PORTAGE_COMPRESS="" in make.conf should do. See 'man make.conf' for more fine grained control. |
|
Back to top |
|
|
teika Apprentice
Joined: 19 Feb 2011 Posts: 155 Location: YYYY-MM-DD, period. Have you ever used the Internet?
|
Posted: Wed Jul 18, 2012 1:03 am Post subject: |
|
|
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. _________________ Hack of easy Shift / Ctrl / AltGr etc; save your pinkies, type without drudgery: topic 865313
XPAT - Xi, Putin, Abe and Trump - are security holes of their own nations. |
|
Back to top |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
Posted: Wed Jul 18, 2012 9:41 am Post subject: |
|
|
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 |
|
|
ulm Developer
Joined: 04 Oct 2004 Posts: 98 Location: Mainz, Germany
|
Posted: Wed Jul 18, 2012 9:18 pm Post subject: |
|
|
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 |
|
|
teika Apprentice
Joined: 19 Feb 2011 Posts: 155 Location: YYYY-MM-DD, period. Have you ever used the Internet?
|
Posted: Wed Aug 08, 2012 9:29 am Post subject: |
|
|
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. _________________ Hack of easy Shift / Ctrl / AltGr etc; save your pinkies, type without drudgery: topic 865313
XPAT - Xi, Putin, Abe and Trump - are security holes of their own nations. |
|
Back to top |
|
|
|