On 24/06/18 11:24, Morgan Adamiec wrote: >> Please append a version of you patch in the subject line. e.g. >> [PATCH 7/7 v3] > > Eli gave me a little walk through on the best practises for patches, > next patches will include this. > >> I'm still not happy with this patch. Why not just explicitly check that >> "any" is specified on its own, rather than a check here and one in the >> following loop. >> >> if in_array "any" "${arch[@]}"; then >> if (( ${#arch[@]} == 1 )); then >> return 0; >> else >> error "$(gettext "...")" >> return 1; >> fi >> fi > > The explicit check will accept any on it's own but doesn't do anything > about mixing any and other architectures > The loop then makes sure any has not been snuck into the middle of the > depends array. > > Without the former we would get: "pkgbase is not available for the > 'any' architecture". > Without the latter "depends=('foo any bar)" would be valid. (and yes I > saw a package doing this once) >
And what does the code I provided above do? A