[pacman-dev] [PATCH] Check architecture specific fields for VCS support
Dave Reisner
d at falconindy.com
Mon Dec 22 01:11:13 UTC 2014
On Mon, Dec 22, 2014 at 10:38:25AM +1000, Allan McRae wrote:
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> scripts/makepkg.sh.in | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 23e70cd..f5373bf 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -2897,6 +2897,7 @@ get_vcsclient() {
>
> check_vcs_software() {
> local ret=0
> + local alldeps l
>
> if (( SOURCEONLY == 1 )); then
> # we will not download VCS sources
> @@ -2908,6 +2909,20 @@ check_vcs_software() {
> return $ret
> fi
>
> +
Can you add a comment explaining why we only want the globals here, and
don't care about depends in package functions?
> + if array_build l 'depends'; then
> + alldeps+=("${l[@]}")
> + fi
> + if array_build l 'makedepends'; then
> + alldeps+=("${l[@]}")
> + fi
> + if array_build l "depends_$CARCH"; then
> + alldeps+=("${l[@]}")
> + fi
> + if array_build l "makedepends_$CARCH"; then
> + alldeps+=("${l[@]}")
> + fi
use a for loop?
> +
> for netfile in ${source[@]}; do
As I mentioned on IRC, you need to use get_all_sources_for_arch() here.
> local proto=$(get_protocol "$netfile")
>
> @@ -2921,7 +2936,7 @@ check_vcs_software() {
> uninstalled="$(set +E; check_deps $client)" || exit 1
> # if not installed, check presence in depends or makedepends
> if [[ -n "$uninstalled" ]] && (( ! NODEPS || ( VERIFYSOURCE && !DEP_BIN ) )); then
> - if ! in_array "$client" ${depends[@]} ${makedepends[@]}; then
> + if ! in_array "$client" ${alldeps[@]}; then
"${alldeps[@]}"
> error "$(gettext "Cannot find the %s package needed to handle %s sources.")" \
> "$client" "${proto%%+*}"
> ret=1
> --
> 2.2.0
More information about the pacman-dev
mailing list