Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion install/config/localdb.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Update localdb so that locate will find everything installed
# Ensure /home is indexed on Btrfs (subvolumes look like bind mounts)
sudo sed -i 's/PRUNE_BIND_MOUNTS.*=.*/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sed replacement also writes PRUNE_BIND_MOUNTS = "no" with spaces around =, which is invalid in /etc/updatedb.conf (it’s a shell-style config sourced by updatedb). This can cause sudo updatedb to fail after install. Replace with PRUNE_BIND_MOUNTS="no" (no spaces) and consider anchoring the pattern to ^PRUNE_BIND_MOUNTS= to avoid unintended edits.

Suggested change
sudo sed -i 's/PRUNE_BIND_MOUNTS.*=.*/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf
sudo sed -i 's/^PRUNE_BIND_MOUNTS=.*/PRUNE_BIND_MOUNTS="no"/' /etc/updatedb.conf

Copilot uses AI. Check for mistakes.
sudo updatedb
5 changes: 5 additions & 0 deletions migrations/1776317254.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Allow plocate to index Btrfs subvolumes (including home)"

if grep -q '^PRUNE_BIND_MOUNTS.*=.*"yes"' /etc/updatedb.conf; then
sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement text writes PRUNE_BIND_MOUNTS = "no" with spaces around =, which is not valid shell assignment syntax. /etc/updatedb.conf is sourced by updatedb, so this can break updatedb (and therefore locate) entirely. Update the sed replacement to PRUNE_BIND_MOUNTS="no" (no spaces) and keep the match anchored to the intended assignment line.

Suggested change
sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf
sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS="no"/' /etc/updatedb.conf

Copilot uses AI. Check for mistakes.
fi