Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 518316 Details for
Bug 646856
flag-o-matic.eclass: clean strip-flags up
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug-646856-02.patch
bug-646856-02.patch (text/plain), 1.03 KB, created by
kfm
on 2018-02-07 02:56:22 UTC
(
hide
)
Description:
bug-646856-02.patch
Filename:
MIME Type:
Creator:
kfm
Created:
2018-02-07 02:56:22 UTC
Size:
1.03 KB
patch
obsolete
>commit 5d76162f81aa398fa7702cb4400f9d4644d48912 >Author: Kerin Millar <kfm@plushkava.net> >Date: Wed Feb 7 02:37:56 2018 +0000 > > flag-o-matic: remove array dereferencing and avoid unsafe expansions in _is_flaq() > > Now that strip-flags() no longer attempts to erroneously use the array > dereferencing feature of _is_flagq(), we can remove support for it > altogether. > > Additionally, quote expansions properly and use read to split the scalar > containing the flag list, thus avoiding the potentially harmful effects > of globbing and pathname expansion. $2 remains unquoted, as it must be > treated as a glob. > >diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass >index e01eb80e2b67..25a836f9b168 100644 >--- a/eclass/flag-o-matic.eclass >+++ b/eclass/flag-o-matic.eclass >@@ -295,8 +295,10 @@ replace-cpu-flags() { > } > > _is_flagq() { >- local x var="$1[*]" >- for x in ${!var} ; do >+ local x >+ local -a flags >+ read -ra flags <<<"${!1}" >+ for x in "${flags[@]}"; do > [[ ${x} == $2 ]] && return 0 > done > return 1
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 646856
:
518314
| 518316