summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/chroot.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 88c5466b8..0b54a3925 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -36,3 +36,14 @@ Chroot ()
return "${?}"
}
+
+Chroot_has_package() {
+ PACKAGE="${1}"; shift
+ CHROOT="${2:-chroot}"; shift
+
+ if dpkg-query --admindir=${CHROOT}/var/lib/dpkg -s ${PACKAGE} >/dev/null 2>&1 | grep -q "^Status: install"
+ then
+ return 0
+ fi
+ return 1
+}