summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/find_nonexistent_installed_packages.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/.scripts/find_nonexistent_installed_packages.sh b/.scripts/find_nonexistent_installed_packages.sh
index a7f857e..ecd2334 100755
--- a/.scripts/find_nonexistent_installed_packages.sh
+++ b/.scripts/find_nonexistent_installed_packages.sh
@@ -1,11 +1,12 @@
#!/bin/bash
+source /etc/make.conf
+installed=$(find "`portageq vdb_path`" -maxdepth 2 -mindepth 2 -printf "%P\n" | xargs qatom | awk '{print $1 "/" $2}')
-source "/etc/make.conf"
-installed=$(find /var/db/pkg -maxdepth 2 -mindepth 2 -printf "%P\n" | xargs qatom | awk '{print $1 "/" $2}')
+portdirs="$(portageq portdir) $(portageq portdir_overlay)"
for package in ${installed}
do
- for overlay in "/usr/portage/" ${PORTDIR_OVERLAY}
+ for overlay in ${portdirs}:
do
# as soon as we find a package => got to next package in outer loop
[[ -d "${overlay}/${package}" ]] && continue 2;