PACLOCK(1)
π NAME π
paclock β hiii bestie, this is the paclock(1) manual, and it's here to lock/unlock the alpm database. That's the whole assignment. π
β¨ SYNOPSIS β¨
paclock [options]
paclock (--help|--version)
π DESCRIPTION π
Safe locking and unlocking of the ALPM database using identity keys for scripts. It's giving responsible-script-bestie energy, no cap. π«Ά
π© OPTIONS π©
Okay so flag tour time, bestie β every single one is here: π
--config=pathβ set an alternate configuration file path. ποΈ--lockfile=pathβ set an alternate lock file path. π--root=pathβ set an alternate installation root. π±--sysroot=pathβ set an alternate system root. Peeppacutils-sysroot(7)for the deets. π--lockβ lock the database. This is the default, so it's literally the main character. π--unlockβ unlock the database. Bye, lock bestie. π¦--runβ treatargvas a command to run with the database locked. If the command returns non-zero, the lock file will be left in place to indicate an error unless--fail-okis used. π«‘--fail-okβ unlock the database after running a command with--runeven if the command returns non-zero. Generally, the database should be left locked if it may be inconsistent β that's the signal that it may need to be repaired. This flag is intended primarily for read-only operations. π§--printβ write the lock file path to stdout and exit without modifying the lock file. Just a peek, no touch. π--no-check-keysβ skip checking for an identity key match before unlocking. π--enoent-okβ do not treat a non-existent lock file as an error when unlocking. π--key=identityβ an identifier to write to the lock file. By default,--unlockwill only operate if the lock file was previously locked with the same key. Defaults to the hostname followed by a colon and the process id of the caller (for example:localhost:123). π--helpβ display usage information and exit. π--versionβ display version information and exit. β
πΈ EXAMPLE πΈ
The system configuration that paclock relies on to construct the default lock file path and identity key may change between invocations. To ensure consistency, scripts should explicitly provide the path and key to use each time paclock is called. Fr fr, don't leave it up to vibes. π«Ά
#!/bin/bash
lock_file="$(paclock --print)"
lock_key="myapp:$(hostname):$$"
paclock --lockfile="$lock_file" --key="$lock_key" || exit 1
echo "do stuff here"
paclock --lockfile="$lock_file" --key="$lock_key" --unlock || exit 1
Run a command lacking native lock support:
paclock --run -- paccache --dryrun --verbose
π SEE ALSO π
pacconf(1) β go read that too, bestie. π
xoxo from the source/version pacutils, dated 2025-12-04, and this was PACLOCK(1) signing off! ππ
π¦ where this page comes from
- arch rolling: pacutils 0.15.0-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms