Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion bin/omarchy-pkg-aur-install
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ if [[ -n $pkg_names ]]; then

echo "$pkg_names" | sed 's/^/aur\//' | tr '\n' ' ' | xargs yay -S --noconfirm
code=$?
sudo updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots
sudo updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots --add-prunefs="fuse.rclone smb3 davfs ceph"
omarchy-show-done $code
fi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots
ExecStart=/usr/bin/updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots --add-prunefs="fuse.rclone smb3 davfs ceph"
2 changes: 1 addition & 1 deletion docs/file-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ upgrade. This is documented in the PKGBUILD.

## Locate indexing

`default/systemd/system/plocate-updatedb.service.d/10-omarchy.conf` ships through `omarchy-settings` to `/usr/lib/systemd/system/plocate-updatedb.service.d/10-omarchy.conf`. It replaces the existing service's `ExecStart` with `updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots`, keeping Btrfs subvolume mounts searchable and excluding Snapper snapshots. The upstream service retains its timer, resource limits, and sandbox; Omarchy's existing AC-power condition still applies.
`default/systemd/system/plocate-updatedb.service.d/10-omarchy.conf` ships through `omarchy-settings` to `/usr/lib/systemd/system/plocate-updatedb.service.d/10-omarchy.conf`. It replaces the existing service's `ExecStart` with `updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots --add-prunefs="fuse.rclone smb3 davfs ceph"`, keeping Btrfs subvolume mounts searchable, excluding Snapper snapshots, and skipping rclone, SMB3, WebDAV, and Ceph mounts that plocate's default `PRUNEFS` misses. The upstream service retains its timer, resource limits, and sandbox; Omarchy's existing AC-power condition still applies.

`/etc/updatedb.conf` remains owned by plocate and is never rewritten by Omarchy. The command-line options override bind-mount pruning and add to the administrator's existing path exclusions. Installer and AUR package refreshes pass the same options directly because installation may run without systemd and an explicitly requested refresh should work on battery.

Expand Down
2 changes: 1 addition & 1 deletion install/post-install/localdb.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Update localdb so locate can find the installed system files immediately.
# Match the scheduled service while installation runs without a system manager.
updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots
updatedb --prune-bind-mounts=no --add-prunepaths=/.snapshots --add-prunefs="fuse.rclone smb3 davfs ceph"
4 changes: 3 additions & 1 deletion test/shell.d/locate-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ directives = [line.strip() for line in drop_in.read_text().splitlines() if line.
check(len(directives) == 3 and directives[:2] == ["[Service]", "ExecStart="] and directives[2].startswith("ExecStart="),
"locate drop-in replaces the command and preserves upstream service restrictions")
command = shlex.split(directives[2].removeprefix("ExecStart="))
options = ["--prune-bind-mounts=no", "--add-prunepaths=/.snapshots"]
options = ["--prune-bind-mounts=no", "--add-prunepaths=/.snapshots", "--add-prunefs=fuse.rclone smb3 davfs ceph"]
check(command == ["/usr/bin/updatedb", *options],
"locate service runs updatedb directly with fixed Btrfs options")
check("ConditionACPower=true" in (root / "etc/systemd/system/plocate-updatedb.service.d/ac-only.conf").read_text(),
Expand Down Expand Up @@ -77,6 +77,8 @@ with tempfile.TemporaryDirectory(prefix="omarchy-locate-") as scratch:
debug = result.stdout + result.stderr
check("prune_bind_mounts\\000\n0\\000" in debug and "/.snapshots\\000" in debug,
"real updatedb overrides bind-mount pruning and adds root snapshots to exclusions")
check(all(fs + "\\000" in debug.upper() for fs in ("FUSE.RCLONE", "SMB3", "DAVFS", "CEPH")),
"real updatedb skips network and FUSE filesystems missing from Arch's defaults")
Comment thread
americos marked this conversation as resolved.
Resolved
entries = subprocess.check_output(["plocate", "--database", str(database), ""], text=True).splitlines()
check(str(visible) in entries and str(hidden) not in entries,
"real locate indexes current files and preserves literal administrator exclusions")
Expand Down