Moved from, http://bugs.gentoo.org/show_bug.cgi?id=169772#c34 http://bugs.gentoo.org/show_bug.cgi?id=169772#c35 Before it gets lost. I've recently had to add another ebuild in tree using `ecompress --suffix` to symlink manpages ( see, app-cdr/cdrkit-1.1.9-r1 and how it's changed from -r0 ) in src_install [ .. snip .. ] local msuffix=$(ecompress --suffix) dosym wodim.1${msuffix} /usr/share/man/man1/cdrecord.1${msuffix} [ .. snip .. ] Same method is being used in pkg_ phases when using alternatives.eclass (see e.g. media-gfx/xloadimage) but before you say anything, yes, we could deprecate the entire eclass (it's pretty ugly) but it still leaves the first example mentioned in this bug. Please provide a way that's acceptable in PMS for symlinking manpages, and possible other files Sorry if this is a dupe of somesort
This should be covered by controllable compression in EAPI 3, see bug 260118: "The package manager shall take appropriate steps to ensure that its compression mechanisms behave sensibly even if an item is listed in the inclusion list multiple times, if an item is a symlink, or if a file is already compressed."
(In reply to comment #1) > This should be covered by controllable compression in EAPI 3, see bug 260118: > > "The package manager shall take appropriate steps to ensure that its > compression mechanisms behave sensibly even if an item is listed in the > inclusion list multiple times, if an item is a symlink, or if a file is already > compressed." I am curious how this can be done "sensible" wrt the current alternatives.eclass and manpages linking in pkg_postinst.
(In reply to comment #2) > I am curious how this can be done "sensible" wrt the current > alternatives.eclass and manpages linking in pkg_postinst. The following is from emacs-21.4-r8.ebuild (last version before we switched to eselect): # extract the suffix of the manpages to determine the correct # compression program local suffix=$(echo /usr/share/man/man1/emacs.emacs-*.1* | sed 's/.*\.1//') for j in emacs etags ctags gfdl; do alternatives_auto_makesym "/usr/share/man/man1/$j.1${suffix}" \ "/usr/share/man/man1/$j.emacs-*" done Also I'd also say that for most usage cases man pages shouldn't be symlinked, but included with ".so". See for example grep.1 / egrep.1 / fgrep.1. Otherwise, a separate cache will be generated for each symlink, instead of a single one for the real man page.
agreed -- symlinking is wrong, and thus there should be no need to use ecompress --suffix. people should be leveraging the .so redirect: echo .so cdrecord.1 > wodim.1 i wasnt aware of the cache feature as fallout of this though, thanks for the tip.