Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278744 - dev-libs/openssl FEATURES misuse (noman)
Summary: dev-libs/openssl FEATURES misuse (noman)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: QAcanfix
Depends on:
Blocks: 174335
  Show dependency tree
 
Reported: 2009-07-22 19:13 UTC by Thilo Bangert (RETIRED) (RETIRED)
Modified: 2012-01-14 22:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Replace FEATURES/noman by doc USE flag for dev-libs/openssl-0.9.8l-r2 ebuild (openssl-0.9.8l-r2.ebuild.patch,2.66 KB, patch)
2010-02-07 19:51 UTC, Didier Barvaux
Details | Diff
Remove test for noman in FEATURES (openssl-0.9.8n.ebuild.diff,480 bytes, patch)
2010-03-27 16:24 UTC, Didier Barvaux
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-22 19:13:25 UTC
The above package has been found to use FEATURES in at least one of its ebuilds.

FEATURES is a portage specific package manager configuration variable not specified in PMS and cannot reliably be used in ebuilds or eclasses.

Usually there are a number of ways to achieve the same thing though. In other cases, the usage of FEATURES in the ebuild is simply invalid.

If you need to check whether "test" is in ${FEATURES}, you can test if the USE flag "test" is set, since it will be activated in that case.

When you check for "userpriv" in ${FEATURES} you may be able to something like the following instead:

if [[ ${EUID} -eq 0 ]]; then
  rootstuff
else
  nonrootstuff
fi

Thanks
Comment 1 Didier Barvaux 2010-02-07 19:51:29 UTC
Created attachment 218851 [details, diff]
Replace FEATURES/noman by doc USE flag for dev-libs/openssl-0.9.8l-r2 ebuild

Here is a patch against =dev-libs/openssl-0.9.8l-r2 to replace the test for noman in FEATURES by a doc USE flag.

I chose the doc USE flags because it is described as "Adds extra documentation (API, Javadoc, etc)" but it could easily changed if needed. The doc USE flag is on by default to preserve backward compatibility for most people.

To emerge =dev-libs/openssl-0.9.8l-r2 ebuild with man pages:
# emerge -av1 '=dev-libs/openssl-0.9.8l-r2'

To emerge =dev-libs/openssl-0.9.8l-r2 ebuild without man pages:
# USE=-doc emerge -av1 '=dev-libs/openssl-0.9.8l-r2'

Similar patch could be created for =dev-libs/openssl-1.0.0_beta5 but I wait for feedback on the patch for =dev-libs/openssl-0.9.8l-r2 to do the job.

Any comments ?
Comment 2 SpanKY gentoo-dev 2010-02-07 21:05:06 UTC
Comment on attachment 218851 [details, diff]
Replace FEATURES/noman by doc USE flag for dev-libs/openssl-0.9.8l-r2 ebuild

USE=doc does not cover man pages
Comment 3 Didier Barvaux 2010-02-07 21:33:38 UTC
(In reply to comment #2)
> (From update of attachment 218851 [details, diff])
> USE=doc does not cover man pages
> 

Is there another USE flag I can use instead of doc ? Is USE=man OK ?
Comment 4 William Hubbs gentoo-dev 2010-02-07 23:13:34 UTC
The ebuild should always install man pages.
A user can use the following setting in /etc/make.conf to not install man pages:

INSTALL_MASK="/usr/share/man"
Comment 5 Didier Barvaux 2010-03-27 16:23:24 UTC
(In reply to comment #4)
> The ebuild should always install man pages.
> A user can use the following setting in /etc/make.conf to not install man
> pages:
> 
> INSTALL_MASK="/usr/share/man"
> 

I see you point. I'm going to attach a patch for the =dev-libs/openssl-0.9.8n ebuild to simply remove the test for noman in FEATURES.
Comment 6 Didier Barvaux 2010-03-27 16:24:12 UTC
Created attachment 225465 [details, diff]
Remove test for noman in FEATURES
Comment 7 Brian Harring (RETIRED) gentoo-dev 2012-01-14 22:52:58 UTC
The FEATURES usage here is fine; the pkg doesn't rely on FEATURES awareness, it optionally flips off manpage generation from even occuring via it.