Hi fellow-archers, I have two packages, A and B, which both provide the same file X. Is there a way to tell pacman to ignore file X in package B, so it is installed (and updated) solely with A? My current ideas are: * repackage B (the official package), so it does not include X anymore -> tedious, feels unnecessary * change packaging of A (unofficial package), so X is now called Y -> this will break a lot of configs, because X is hooked up in many places -> I'd like to avoid this option * tell pacman to ignore X in package B (something like NoExtract - but except, that it is package specific and that it works as I need it ;-p) regards, Erich
On 10/10/23 02:41, Erich Eckner wrote:
Hi fellow-archers,
Hi!
I have two packages, A and B, which both provide the same file X.
... Without knowing more its a bit hard to say. For example are A and B actually the same application but different versions (git vs stable). If so, then just make the unofficial git version conflict with official one. If not as above, without knowing more it's difficult to say. One possibility is to simply change the unofficial one to install in /usr/local (all of it /usr/local/etc, /usr/local/bin, /usr/local/lib, /usr/local/var and so on. That way nothing will conflict. That said, no 2 packages, unofficial or official should ever provide the same file at the same path location other than the case above where only 1 of the 2 can be installed due to conflicts=(other). regards, gene
On 23/10/10 05:28AM, Genes Lists wrote:
On 10/10/23 02:41, Erich Eckner wrote:
I have two packages, A and B, which both provide the same file X.
... One possibility is to simply change the unofficial one to install in /usr/local (all of it /usr/local/etc, /usr/local/bin, /usr/local/lib, /usr/local/var and so on. That way nothing will conflict.
Packages should _never_ install to /usr/local as per the Arch Linux Packaging Guidelines[0]! In general conflicts=(...) or rename is the way to go, usually the problem is mostly present for binaries and then renaming them is the way to go, see [1][2] for an example. I am also happy to help if you post some more detailed information! best, gromit [0] https://wiki.archlinux.org/title/Arch_package_guidelines#Package_etiquette [1] https://gitlab.archlinux.org/archlinux/packaging/packages/minio-client/-/blo... [2] https://gitlab.archlinux.org/archlinux/packaging/packages/minio-client/-/blo...
Hi, sry for leaving out the details in the first place. I'll put them in-line: On Tue, 10 Oct 2023, Christian Heusel wrote:
On 23/10/10 05:28AM, Genes Lists wrote:
On 10/10/23 02:41, Erich Eckner wrote:
I have two packages, A and B, which both provide the same file X.
... One possibility is to simply change the unofficial one to install in /usr/local (all of it /usr/local/etc, /usr/local/bin, /usr/local/lib, /usr/local/var and so on. That way nothing will conflict.
This is (one possibility for) the second option, that I mentioned, which I was afraid might break a lot of stuff on my machines :-/
Packages should _never_ install to /usr/local as per the Arch Linux Packaging Guidelines[0]!
good to know, thanks!
In general conflicts=(...) or rename is the way to go, usually the problem is mostly present for binaries and then renaming them is the way to go, see [1][2] for an example.
I am also happy to help if you post some more detailed information!
The official package is tar, which now includes a /usr/bin/backup binary (script), that conflicts with the backup script, which I wrote myself and packaged in https://arch.eckner.net/os/x86_64/hardlinked-backups-1.7-1-any.pkg.tar.zst resp. https://git.eckner.net/Erich/archlinuxewe/tree/hardlinked-backups/PKGBUILD They provide different functionality - or at least, providing and conflicting tar is no option for me :-D. I see, that the root cause (and the "clean fix") is to rename the backup script in my package. However, I was hoping for a "hack" to simply tell pacman to ignore /usr/bin/backup from tar. The problem with the "rename /usr/bin/backup to /usr/bin/hard-linked-backup" approach is, that this is hooked up in cron and systemd timers/services, so backups run automatically (and I'm afraid, I'm also calling it *somewhere* manually to back up). Also, I'm a bit unsure, how to avoid such situations in future / for other packages. But I feel, like there is no general solution to this issue.
best, gromit
[0] https://wiki.archlinux.org/title/Arch_package_guidelines#Package_etiquette [1] https://gitlab.archlinux.org/archlinux/packaging/packages/minio-client/-/blo... [2] https://gitlab.archlinux.org/archlinux/packaging/packages/minio-client/-/blo...
Thanks for your answers! Regards, Erich
On 10/10/23 07:00, Erich Eckner wrote:
Hi,
...
This is (one possibility for) the second option, that I mentioned, which I was afraid might break a lot of stuff on my machines :-/
I meant put it in /usr/local/xxx/ not directly in /usr/local. Or in /opt/xxx/
I see, that the root cause (and the "clean fix") is to rename the backup script in my package.
Yah that is the right way. What I do is name all my stuff to ensure the name is reasonably unique ( not UUID unique but good enough ). For example you could simply add a prefix (or suffix) - like backup-ee. best gene
participants (3)
-
Christian Heusel
-
Erich Eckner
-
Genes Lists