Unique the return lists of sources to prevent duplication which occurs
because of merge_arch_attrs.

Fixes: https://bugs.archlinux.org/task/43387
---
 scripts/makepkg.sh.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 1720e64..85e297a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -792,6 +792,9 @@ get_all_sources() {
                fi
        done
 
+       # TODO(dreisner): get rid of this once merge_arch_attrs is dead
+       mapfile -t aggregate < <(printf '%s\n' "${aggregate[@]}" | awk 
'!a[$0]++')
+
        array_build "$1" "aggregate"
 }
 
@@ -806,6 +809,9 @@ get_all_sources_for_arch() {
                aggregate+=("${l[@]}")
        fi
 
+       # TODO(dreisner): get rid of this once merge_arch_attrs is dead
+       mapfile -t aggregate < <(printf '%s\n' "${aggregate[@]}" | awk 
'!a[$0]++')
+
        array_build "$1" "aggregate"
 }
 
@@ -1607,6 +1613,8 @@ source_safe() {
        shopt -s extglob
 }
 
+# TODO(dreisner): kill off this function and consistently access arch-specific
+# attributes throughout.
 merge_arch_attrs() {
        local attr supported_attrs=(
                provides conflicts depends replaces optdepends
-- 
2.2.1

Reply via email to