Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274487 - Please provide a alternative to `ecompress --suffix` in ebuilds
Summary: Please provide a alternative to `ecompress --suffix` in ebuilds
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 10:01 UTC by Samuli Suominen (RETIRED)
Modified: 2009-06-17 12:02 UTC (History)
1 user (show)

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 Samuli Suominen (RETIRED) gentoo-dev 2009-06-17 10:01:25 UTC
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
Comment 1 Ulrich Müller gentoo-dev 2009-06-17 10:35:25 UTC
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."
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2009-06-17 10:56:15 UTC
(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.
Comment 3 Ulrich Müller gentoo-dev 2009-06-17 11:20:01 UTC
(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.
Comment 4 SpanKY gentoo-dev 2009-06-17 12:02:32 UTC
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.