$NetBSD: patch-list-installed.d_50list-installed,v 1.5 2022/12/22 13:40:10 schmonz Exp $ Add pkg_install support. --- list-installed.d/50list-installed.orig 2022-09-08 16:13:15.000000000 +0000 +++ list-installed.d/50list-installed @@ -15,9 +15,11 @@ else # Output to stdout a *sorted* list of all currently installed # (or removed but still with config-files) packages, in the # format "package version\n" (or something similar). - if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then + if [ "$LOWLEVEL_PACKAGE_MANAGER" = pkg_install ]; then + pkg_info -a -I | awk '{print $1}' | sed -e 's|\(.*\)-|\1 |' | sort + elif [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then dpkg-query -W -f '${Status}\t${Package} ${Version} ${Architecture}\n' | \ - grep -E '(ok installed|ok config-files)' | cut -f2,3 + @EGREP@ '(ok installed|ok config-files)' | cut -f2,3 elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then