aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <aaron@grandmasfridge.org>2018-01-14 10:32:31 -0500
committerAaron W. Swenson <aaron@grandmasfridge.org>2018-01-14 10:32:31 -0500
commitc4bb082cab28210b16b44e001f213f9a5ad7d47b (patch)
treee73be2b2e9504b3e0a74a031aa2a6e1f5fe6c8d9
parentRemove $Id and Bump Version (diff)
downloadeselect-c4bb082cab28210b16b44e001f213f9a5ad7d47b.tar.gz
eselect-c4bb082cab28210b16b44e001f213f9a5ad7d47b.tar.bz2
eselect-c4bb082cab28210b16b44e001f213f9a5ad7d47b.zip
Cleanup senseless symlinks
Look for broken symlinks in the /usr/include/postgresql-${SLOT} directories. These were made by 2.1. So now we try to clean them up.
-rw-r--r--postgresql.eselect10
1 files changed, 10 insertions, 0 deletions
diff --git a/postgresql.eselect b/postgresql.eselect
index 5c90b4b..51d7f50 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -382,6 +382,16 @@ do_update() {
echo "It should be safe for you to remove '${etc_path}'"
fi
fi
+
+ # 2.1 would make some bad symlinks where it shouldn't have. We
+ # attempt to clean them up here.
+ local badsym
+ for badsym in $(find "${USR_PATH}"/include/postgresql-* -type l \
+ -exec test ! -e {} \; -print)
+ do
+ rm "${badsym}"
+ done
+
## End Antiquity Clean Up
local active_slot=$(active_slot)