Added support for Slackware into FileInstalledByPackage function

This commit is contained in:
pyllyukko 2026-01-13 20:07:36 +02:00
parent b85cd6b266
commit a2b3c48bfc
No known key found for this signature in database
GPG key ID: 6D64E828379852AC

View file

@ -787,8 +787,12 @@
exitcode=1
file=$1
find=""
pattern=""
if [ -n "${DPKGBINARY}" ]; then
find=$(${DPKGBINARY} -S "${file}" 2> /dev/null | ${AWKBINARY} -F: '{print $1}')
elif [ "${OS_NAME}" = "Slackware Linux" -a -d "${ROOTDIR}/var/lib/pkgtools/packages" ]; then
pattern="${file//./\\.}"
find=$(${GREPBINARY} -l "^${pattern#/}\(\.new\)\?$" ${ROOTDIR}/var/lib/pkgtools/packages/* | ${SEDBINARY} 's/^.\+\///')
elif [ -n "${RPMBINARY}" ]; then
find=$(${RPMBINARY} -qf "${file}" 2> /dev/null | ${AWKBINARY} -F- '{print $1}')
fi