Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2019-12-10 00:23:49 +0300
committerBryan Drewery <bryan@shatow.net>2019-12-10 00:23:49 +0300
commitdb9d1d9ce3ef7289724c453ba370a9b0eb3222d8 (patch)
tree03826d6ab3e7c35454a41bf6b20b06189de88029 /src
parent8f3099a8e912e0a2ca2586f64d1ab017311cf280 (diff)
Remove unneeded _find_origin_in_ports_or_overlays.
test_port_origin_exist() can be used now. The only point of the other was to have a relative path lookup which is now always done with MASTERMNTREL.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/share/poudriere/common.sh26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index b67e95dd..a0317faa 100755
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -6120,7 +6120,7 @@ deps_sanity() {
msg_error "${COLOR_PORT}${originspec}${COLOR_RESET} depends on bad origin '${COLOR_PORT}${dep_origin}${COLOR_RESET}'; Please contact maintainer of the port to fix this."
ret=1
fi
- if ! _find_origin_in_ports_or_overlays "${dep_origin}"; then
+ if ! test_port_origin_exist "${dep_origin}"; then
# Was it moved? We cannot map it here due to the ports
# framework not supporting it later on, and the
# PKGNAME would be wrong, but we can at least
@@ -6598,11 +6598,11 @@ test_port_origin_exist() {
local o
for o in ${OVERLAYS}; do
- if [ -d "${MASTERMNT}/overlays/${o}/${_origin}" ]; then
+ if [ -d "${MASTERMNTREL}/overlays/${o}/${_origin}" ]; then
return 0
fi
done
- if [ -d "${MASTERMNT}/${PORTSDIR}/${_origin}" ]; then
+ if [ -d "${MASTERMNTREL}/${PORTSDIR}/${_origin}" ]; then
return 0
fi
return 1
@@ -6745,24 +6745,6 @@ _list_ports_dir() {
done
}
-_find_origin_in_ports_or_overlays() {
- [ $# -eq 1 ] || eargs _find_origin_in_ports_or_overlays origin
- [ "${PWD}" = "${MASTERMNT}/.p" ] || \
- err 1 "_find_origin_in_ports_or_overlays requires PWD=${MASTERMNT}/.p"
- local origin="$1"
- local o
-
- for o in ${OVERLAYS}; do
- if [ -d "../overlays/${o}/${origin}" ]; then
- return 0
- fi
- done
- if [ -d "../${PORTSDIR}/${origin}" ]; then
- return 0
- fi
- return 1
-}
-
_listed_ports() {
local tell_moved="${1}"
local portsdir origin file o
@@ -6818,7 +6800,7 @@ _listed_ports() {
else
unset new_origin
fi
- if ! _find_origin_in_ports_or_overlays "${origin}"; then
+ if ! test_port_origin_exist "${origin}"; then
msg_error "Nonexistent origin listed: ${COLOR_PORT}${origin_listed}${new_origin:+${COLOR_RESET} (moved to nonexistent ${COLOR_PORT}${new_origin}${COLOR_RESET})}"
set_dep_fatal_error
continue