zig.eclass: avoid redundant dependency renaming when basename matches

Otherwise pkgcheck complains with RedundantUriRename.

Signed-off-by: sin-ack <sin-ack@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45908
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
sin-ack
2026-03-10 00:10:40 +00:00
committed by Sam James
parent 5f6cf3693c
commit 5bdadcf36e

View File

@@ -1,4 +1,4 @@
# Copyright 2024-2025 Gentoo Authors
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: zig.eclass
@@ -144,8 +144,12 @@ _zig_set_zbs_uris() {
local dependency
for dependency in "${!ZBS_DEPENDENCIES[@]}"; do
local uri="${ZBS_DEPENDENCIES[${dependency}]}"
local basename="${uri##*/}"
if [[ -n "${uri}" ]]; then
ZBS_DEPENDENCIES_SRC_URI+=" ${uri} -> ${dependency}"
ZBS_DEPENDENCIES_SRC_URI+=" ${uri}"
if [[ "${basename}" != "${dependency}" ]]; then
ZBS_DEPENDENCIES_SRC_URI+=" -> ${dependency}"
fi
fi
done
}