Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 368516 Details for
Bug 498988
eutils.eclass: optfeature function
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
eutils_add_optfeature_v4.patch
eutils_add_optfeature_v4.patch (text/plain), 1.35 KB, created by
Andrew Hamilton
on 2014-01-23 05:23:21 UTC
(
hide
)
Description:
eutils_add_optfeature_v4.patch
Filename:
MIME Type:
Creator:
Andrew Hamilton
Created:
2014-01-23 05:23:21 UTC
Size:
1.35 KB
patch
obsolete
>--- eutils.eclass 2014-01-22 23:36:35.819000000 -0500 >+++ eutils.eclass.patched 2014-01-23 00:22:31.783000000 -0500 >@@ -1729,4 +1729,51 @@ > > check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; } > >+# @FUNCTION: optfeature >+# @USAGE: <short description> <package atom to match> [other atoms] >+# @DESCRIPTION: >+# Print out a message suggesting an optional package (or packages) which >+# provide the described functionality >+# >+# The following snippet would suggest app-misc/foo for optional foo support, >+# app-misc/bar or app-misc/baz[bar] for optional bar support >+# and either both app-misc/a and app-misc/b or app-misc/c for alphabet support. >+# @CODE: >+# optfeature "foo support" app-misc/foo >+# optfeature "bar support" app-misc/bar app-misc/baz[bar] >+# optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c >+# >+optfeature() { >+ debug-print-function ${FUNCNAME} "$@" >+ local i >+ local desc=$1 >+ local flag=0 >+ local innercount=0 >+ local innerflag=0 >+ shift >+ for i; do >+ for j in $i; do >+ if has_version "$j"; then >+ flag=1 >+ else >+ flag=0 >+ break >+ fi >+ done >+ if [[ $flag -eq 1 ]]; then >+ break >+ fi >+ done >+ if [[ $flag -eq 0 ]]; then >+ for i; do >+ local msg=" " >+ for j in $i; do >+ msg="${msg} ${j} and" >+ done >+ msg="${msg:0: -4} for ${desc}" >+ elog "${msg}" >+ done >+ fi >+} >+ > fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 498988
:
368498
|
368506
|
368508
|
368510
|
368514
|
368516
|
368518