From 4dfdf0a99e8f0c2540ecdc8cdceb95540be1ae71 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 30 Jul 2022 21:39:18 +0000 Subject: fixed missing sysroots --- src/query.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/query.sh b/src/query.sh index 9531a29..0ff3dbb 100644 --- a/src/query.sh +++ b/src/query.sh @@ -10,14 +10,14 @@ list () { # list installed packages # installed () { - ls -1 ${INSTALLED_DIR} + ls -1 ${SYSROOT}${INSTALLED_DIR} } # list all packages and lable installed ones # list_installed () { list | while read -r line; do - [ -d ${INSTALLED_DIR}/$line ] \ + [ -d ${SYSROOT}${INSTALLED_DIR}/$line ] \ && echo $line "[installed]" \ || echo $line done @@ -37,7 +37,7 @@ search () { # files () { for package in $@; do - local file="${INSTALLED_DIR}/$package/files" + local file="${SYSROOT}${INSTALLED_DIR}/$package/files" [ -f $file ] && cat $file || >&2 printf "${RED}Package ${LIGHT_RED}$package${RED} is not installed\n" done } @@ -49,7 +49,7 @@ file_info () { [ ! -f ${SYSROOT}$file ] && file=$(realpath $file 2>/dev/null) local found=false for pkg in $(installed); do - for list in ${INSTALLED_DIR}/$pkg/files; do + for list in ${SYSROOT}${INSTALLED_DIR}/$pkg/files; do [ -f $list ] && { grep -q "^/usr${file}$" $list || grep -q "^${file}$" $list && { ${QUIET} && echo $pkg || printf "${LIGHT_BLUE}%s${BLUE} belongs to ${LIGHT_BLUE}%s${RESET}\n" $file $pkg @@ -98,7 +98,7 @@ print_info () { # info () { for package in $@; do - infofile=${INSTALLED_DIR}/$package/info + infofile=${SYSROOT}${INSTALLED_DIR}/$package/info [ -f $infofile ] && { print_info $infofile } || { -- cgit v1.2.1