You are not logged in.
Hi folks,
These days (2021, yay!) `pkgfile` was mostly replaced with `pacman -F`.
Source: https://wiki.archlinux.org/title/Pkgfile, https://wiki.archlinux.org/title/Pacman … cific_file
The wiki page for pacman gives good advice:
Tip: You can set a cron job or a systemd timer to sync the files database regularly.
That's exactly what I am looking for. I was going to write my own unit file but then I figured someone else must probably have done that already. And this functionality seems useful enough to have its own PKGBUILD.
Note that pkgfile already comes with its own systemd unit + timer. In an ideal world, I would expect pacman to also come with its own service + timer embedded in its package, but that's not the case today (`pacman -Ql pacman | grep timer` returns nothing).
Doing the baby steps here:
1) Let's consider a separate package that ships a service + time first. Are you aware of any PKGBUILD that does so already?! I tried to search for "pacman sync" but I see no good results (https://aur.archlinux.org/packages/pacman-sync/ is something completely different). If there's no package, I'll probably create one myself, but curious if anyone did that already before I try to reinvent the wheel.
2) Is this something that could eventually make its way to upstream pacman? I will probably file a FR in the bug tracker, but while I'm in the forums, thought I'd reuse this thread to inquire that as well. Worst case, Allan shows up here and says "no way, never happening"
Last edited by thiagowfx (2021-07-11 17:50:43)
Offline
1. pacman-contrib ships a service/timer for paccache.
Offline
And this functionality seems useful enough to have its own PKGBUILD.
It seems pretty silly to me for a couple dozen lines of a PKGBUILD to distrubute 4-5 lines of service file / timer. Just create the service file and timer. There's really nothing to these.
If there's no package, I'll probably create one myself...
Is this something that could eventually make its way to upstream pacman? I will probably file a FR in the bug tracker
For the reason above, I'd suggest not making a package for this. But a PR against pacman or pacman-contrib sounds like a very good idea, and I'd suspect it might be well received.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
But a PR against pacman or pacman-contrib sounds like a very good idea, and I'd suspect it might be well received.
I'd request in pacman-contrib. It will not be accepted in pacman.
Offline
Agreed. Just sent a patch to the current maintainers.
Offline
Note that pkgfile is faster and more efficient... it also does not hold a database lock (it uniquely uses its own cache dir), whereas pacman -Fy and pacman -Syu do in fact hold the same database lock so if you happen to be running -Fy in the background it will make -Syu error out and report another instance of pacman is currently running.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Note that pkgfile is faster and more efficient...
Do you happen to know what is the rationale of `pacman -F` then? When there are two ways of doing the same thing, I tend to prefer the one that is more native. In this case, if there's built-in functionality in pacman that does pkgfile-file funcionality, there's little reason to use pkgfile in the first place - from a simplicity perspective. The performance impact is negligible in this use case.
it also does not hold a database lock (it uniquely uses its own cache dir)
Good point, however, realistically, for a unit file that only syncs once a week, and whose execution only lasts a few seconds, the chances of a collision are relatively small.
Agreed. Just sent a patch to the current maintainers.
Cycling back here, what is the etiquette to send patches / pull requests*? The project is hosted on gitlab, but currently only TUs/Devs have access to Gitlab AFAIK.
I originally sent an email (via git send-email) to the 2 current maintainers of the PKGBUILD, waited for a week, but got no response. Today I just sent the very same patch to the pacman-contrib mailing list (I wasn't aware there was a mailing list for it), but it's pending moderator approval.
I will wait another week or so.
* I should probably open a new thread to ask this...I searched the wiki but didn't find much info on that.
Offline
eschwartz wrote:Note that pkgfile is faster and more efficient...
Do you happen to know what is the rationale of `pacman -F` then? When there are two ways of doing the same thing, I tend to prefer the one that is more native. In this case, if there's built-in functionality in pacman that does pkgfile-file funcionality, there's little reason to use pkgfile in the first place - from a simplicity perspective. The performance impact is negligible in this use case.
pkgfile existed long before pacman gained it's -F functionality.
Offline
what is the etiquette to send patches / pull requests*
If it were me, I'd submit it as a feature request on the bug tracker.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If it were me, I'd submit it as a feature request on the bug tracker.
Fair enough: https://bugs.archlinux.org/index.php?do … k_id=71482
Marking this thread as resolved. Use the FR to continue the discussion if needed.
Offline