Changeset View
Changeset View
Standalone View
Standalone View
Mk/Scripts/actual-package-depends.sh
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | *) | ||||
;; | ;; | ||||
esac | esac | ||||
if [ -n "${searchfile}" ]; then | if [ -n "${searchfile}" ]; then | ||||
${PKG_BIN} which -q ${searchfile} || ${PKG_BIN} which -q "$(resolv_symlink ${searchfile} 2>/dev/null)" || | ${PKG_BIN} which -q ${searchfile} || ${PKG_BIN} which -q "$(resolv_symlink ${searchfile} 2>/dev/null)" || | ||||
echo "actual-package-depends: dependency on ${searchfile} not registered (normal if it belongs to base)" >&2 | echo "actual-package-depends: dependency on ${searchfile} not registered (normal if it belongs to base)" >&2 | ||||
fi | fi | ||||
} | } | ||||
inject_base_dep() { | |||||
ORIGIN="${1}" | |||||
NAME=$(make -C ${PORTSDIR}/${ORIGIN} -V PKGBASE) | |||||
VERSION=$(make -C ${PORTSDIR}/${ORIGIN} -V PKGVERSION) | |||||
echo "\"${NAME}\": {origin: \"${ORIGIN}\", version: \"$VERSION\"}" | |||||
} | |||||
for lookup; do | for lookup; do | ||||
# Ugly, but currently we cannot install BASE packages into read-only poudriere base | |||||
# This allows us to still inject depends on os/* packages | |||||
case ${lookup} in | |||||
/bin/sh) | |||||
inject_base_dep "os/userland-base" | |||||
continue | |||||
;; | |||||
/libexec/ld-elf.so.1) | |||||
inject_base_dep "os/userland-base-bootstrap" | |||||
continue | |||||
;; | |||||
/usr/lib/debug/bin/sh.debug) | |||||
inject_base_dep "os/userland-debug" | |||||
continue | |||||
;; | |||||
/usr/share/man/man1/sh.1.gz) | |||||
inject_base_dep "os/userland-docs" | |||||
continue | |||||
;; | |||||
/usr/lib32/libc.a) | |||||
inject_base_dep "os/userland-lib32" | |||||
continue | |||||
;; | |||||
/usr/tests/README) | |||||
inject_base_dep "os/userland-tests" | |||||
continue | |||||
;; | |||||
*) ;; | |||||
esac | |||||
${PKG_BIN} query "\"%n\": {origin: \"%o\", version: \"%v\"}" "$(find_dep ${lookup})" || : | ${PKG_BIN} query "\"%n\": {origin: \"%o\", version: \"%v\"}" "$(find_dep ${lookup})" || : | ||||
done | done |