You are not logged in.
Hi!
I downloaded a package from extra, applied some custom patches and installed with:
pacman -U .tar.zstThe package gets overwritten when there's an update and I need to go through the same process of downloading the new tar file from archlinux.org/packages applying patches etc.
Any ideas how to do this in a smarter way next time? I would like to automate this somehow.
Last edited by twfox (2025-08-02 14:13:43)
Offline
Hi!
You can go to
/etc/pacman.confand there you can set
IgnorePkg = <packagename>for example
IgnorePkg = ffmpegYou will see it in the file, its documented there.
Offline
https://wiki.archlinux.org/title/Pacman#Hooks
Don't patch (what exactly?) the package, but the installation.
Offline
What are you patching and why?
Offline
Hi!
You can go to
/etc/pacman.confand there you can set
IgnorePkg = <packagename>for example
IgnorePkg = ffmpegYou will see it in the file, its documented there.
I've tried this but it freezes the package and I still want the updates.
https://wiki.archlinux.org/title/Pacman#Hooks
Don't patch (what exactly?) the package, but the installation.
This looks promising, I'll give it a try, thanks!
What are you patching and why?
Urxvt. Its my own combo of patches from different AUR pkgs.
Offline
So you're essentially using a completely different package.
Just don't install urxvt from the repos tbw.
Offline
Well I wouldn't say completely different, its still like 98% the same, patches are small.
I don't know if it will be more work to maintain the hook or my own build but in any case I'll give a try to learn how it works.
Thanks again for the suggestion!
Offline
Well I wouldn't say completely different, its still like 98% the same, patches are small.
Sure, but you apply them at build-time, right? You're completely replacing the files from the repo package, no?
Offline
I edit the PGKBUILD and apply the patches during build() , yes.
Offline
That's a completely different package, why would you install urxvt from the repos as well?
Offline
I don't remember doing that, but I did install the result package from makepkg with pacman -U.
Offline
The package gets overwritten when there's an update
pacman -Qi rxvt-unicodeOffline
The package gets overwritten when there's an update
pacman -Qi rxvt-unicode
You are right, its installed. Is it recognized as the same package, even if I added the extra patches on the PKGBUILD?
In any case, I have reviewed it again and I think I will remove it and just rebuild using the src code, no packages involved.
Offline
I'd rather keep installing your patched version through a package (ie. build the local package w/ you local patches and install that but keep the repo version uninstalled)
In doubt just adjust the package name in the PKGBUILD
Offline
In any case, I have reviewed it again and I think I will remove it and just rebuild using the src code, no packages involved.
You could also go this way:
- Keep building/managing YOUR rxvt-unicode Package with PKGBUILD/makepkg
- Add rxvt-unicode to pacman.conf->IgnorePkg
As rxvt-unicode (YOUR package) is installed on pacman's sight it would now NOT get upgraded if there is a newer version in extra/rxvt-unicode (cause it is ignored).
But you get a hint during pacman -Syu that a newer version is available, but ignored to update.
This give you a good advise to maybe check the reason for a newer version (Upstream, other patches, ABI), , so you could think about modifying/rebuilding also YOUR package/PKGBUILD (//edit and your pkgver/pkgrel to keep in sync with extra repo)
Last edited by GerBra (2025-08-06 19:48:47)
Offline
I think I will remove it and just rebuild using the src code, no packages involved.
Let pacman handle things. You'll forget something eventually and it'll bite you.
I'd rather keep installing your patched version through a package
Indeed, do this rather.
- Add rxvt-unicode to pacman.conf->IgnorePkg
@GerBra raises good points about advisory, but ignoring packages can also lead to trouble long-term when you miss a required rebuild.
Easiest, IMO, is to simply increment the (pkgrel) + (.1) over the current Arch pkgrel.
With this you know when Arch rebuilds occur (and for what reason via git) AND when newer upstream versions are packaged.
E.g. my currently short list of such packages:
warning: hyprland: local (0.50.1-1.1) is newer than extra (0.50.1-1)
warning: libnautilus-extension: local (48.3-1.1) is newer than extra (48.3-1)
warning: nautilus: local (48.3-1.1) is newer than extra (48.3-1)
warning: nvidia-dkms: local (580.65.06-1) is newer than extra (575.64.05-2)
warning: nvidia-utils: local (580.65.06-1) is newer than extra (575.64.05-2)
warning: sway: local (1:1.11-1.1) is newer than extra (1:1.11-1)
warning: vulkan-tools: local (1.4.323-1) is newer than extra (1.4.321.0-1)
warning: wlroots0.19: local (0.19.0-1.1) is newer than extra (0.19.0-1)Offline
I've added IgnorePkg in pacman and tweaked the PKGBUILD to increase pkgrel.
Looking good!
Thanks.
Offline