[pacman-dev] [PATCH 05/11] makepkg: undeclared local variables
Allan McRae
allan at archlinux.org
Sun Jun 20 08:13:10 EDT 2010
On 17/06/10 22:44, Andres P wrote:
> Tight variable scoping should avoid further regressions with new patches and
> variable overriding (see what ac5c2fd09 fixed).
>
> Signed-off-by: Andres P<aepd87 at gmail.com>
> ---
> scripts/makepkg.sh.in | 30 ++++++++++++++++++++++--------
> 1 files changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 37241bd..630d9c2 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
<snip>
> @@ -384,6 +386,9 @@ run_pacman() {
> check_deps() {
> (( $#> 0 )) || return
>
> + # XXX: Due to a bash bug, pmout's subshell cannot be declared sensibly:
> + # local pmout=$(run_pacman -T "$@")
Can you explain that comment?
> + local pmout
> local ret=0
> pmout=$(run_pacman -T "$@")
> ret=$?
> @@ -651,7 +656,7 @@ extract_sources() {
> msg "$(gettext "Extracting Sources...")"
> local netfile
> for netfile in "${source[@]}"; do
> - file=$(get_filename "$netfile")
> + local file=$(get_filename "$netfile")
And why it does not apply here...
> if in_array "$file" ${noextract[@]}; then
> #skip source files in the noextract=() array
> # these are marked explicitly to NOT be extracted
These are the sort of things that are really good to explain in commit
messages.
Allan
More information about the pacman-dev
mailing list