[Bug 293589] pkg install searсh
Date: Wed, 04 Mar 2026 20:54:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293589
Bug ID: 293589
Summary: pkg install searсh
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: Z462vasa@mail.lviv.ua
It is inconvenient to search for package versions when there are many of them.
I suggest adding something like this for installation
#!/bin/sh
# List to check
INPUT="mysql80-server zabbix7-server zabbix7-frontend apache24 mod_php83
php83-mysqli php83-bcmath php83-ctype php83-gd php83-gettext php83-mbstring
php83-session php83-simplexml php83-
FOUND_PKGS=""
echo "--- Starting repositories check ---" >&2
for p in $INPUT; do
printf "Looking for %s*... " "$p" >&2
....
# We search for the full name of the package with the version
# pkg search -q outputs the full string, for example: mysql80-server-8.0.44
FULL_NAME=$(pkg search -q "^${p}-[0-9]" | head -n 1)
....
# If not found with a hyphen, we search just at the beginning (for apache24
etc.)
if [ -z "$FULL_NAME" ]; then
FULL_NAME=$(pkg search -q "^${p}" | head -n 1)
fi
if [ -n "$FULL_NAME" ]; then
printf "FOUND: %s\n" "$FULL_NAME" >&2
FOUND_PKGS="$FOUND_PKGS $FULL_NAME"
else
printf "NOT FOUND\n" >&2
fi
done
echo "--- Checking completed ---" >&2
echo ""
# Output final line with full versions
PKGS2=$(echo $FOUND_PKGS | xargs)
echo "PKGS2=\"$PKGS2\""
--
You are receiving this mail because:
You are the assignee for the bug.