Regenerate build-db only if required (track mtimes of PKGBUILDs like in sync-db).
Regenerate build-db using mtime-tracking routine after updating a PKGBUILD.

It allows to avoid db regeneration if PKGBUILD has not been actually
updated.