[aur-general] Handling of virtual packages
Hey, I’m currently maintaining serval packages on the AUR which are all implementations of djb’s redo[0], an incremental build system. However there are minor differences between all those implementations, and as djb never wrote one himself there is no "offical" one. That’s why I decided to give the packages unique names like "redo-sh"[1] and let them all provide[2] "redo" in their PKGBUILD. Coming from Debian I’m familiar with the concept of virtual packages[3] like www-browser[4], which makes it easy do specify a general dependency without getting to specific about it. As there some programs out there which use redo’s .do files in their building process it’s important that they can specify redo, or any of the existing implementations in their makedepends. But as far as I know there is no way to specify either package A OR B as a dependency for package C, so I came to the conclusion that using such a virtual package would make perfect sense and is the only valid option here. I already saw that "sh" is used like this, but I found no official resources on how Arch or the AUR handles such cases. Also someone just recently created a "redo" package which is in fact just one of the many implementations, which I find kinda problematic. Especially if somebody doesn’t know about the current status of the redo ecosystem. So if anybody knows about the modus operandi in such cases I’d be glad to hear about it. Regards, Felix [0] http://cr.yp.to/redo.html [1] https://aur.archlinux.org/packages/redo-sh [2] https://wiki.archlinux.org/index.php/PKGBUILD#provides [3] https://www.debian.org/doc/debian-policy/ch-binary.html#s-virtual_pkg [4] https://packages.debian.org/jessie/www-browser
On 20/09/2016 3:12 p. m., buckket wrote:
Hey,
I’m currently maintaining serval packages on the AUR which are all implementations of djb’s redo[0], an incremental build system. However there are minor differences between all those implementations, and as djb never wrote one himself there is no "offical" one. That’s why I decided to give the packages unique names like "redo-sh"[1] and let them all provide[2] "redo" in their PKGBUILD.
Coming from Debian I’m familiar with the concept of virtual packages... [snip]
Regards, Felix
I maintain several packages that all provide the same software, different versions, and therefore conflict with each other. The canonical way I've used based on PKGBUILDs created by long-time devs and TUs is to add both a "provides=()" and "conflicts=()" pointing to a common, usually the main, package version. This is all documented in PKGBUILD(1). See the brave browser family for an example.
On Tue, Sep 20, 2016 at 10:12 PM, buckket <buckket@cock.li> wrote:
As there some programs out there which use redo’s .do files in their building process it’s important that they can specify redo, or any of the existing implementations in their makedepends. But as far as I know there is no way to specify either package A OR B as a dependency for package C, so I came to the conclusion that using such a virtual package would make perfect sense and is the only valid option here.
Look at man PKGBUILD's provides=() entry. That makes a package provide a basic functionality, in your case redo, in a particular form, eg. redo-git. It is also a good idea to use conflicts=() to prevent packages from providing the same thing from being installed. cheers! mar77i
On Wed, Sep 21, 2016 at 09:19:10AM +0200, Martin Kühne via aur-general wrote:
It is also a good idea to use conflicts=() to prevent packages from providing the same thing from being installed.
I'd clarify this by saying that if two packages have conflicting files, pacman will still not allow the installation of both at the same time (without the force flag). The conflicts array is still definitely the right way to go, however. There could be a valid case for installing two packages that provide the same thing if they do not conflict on the filesystem. Another key purpose of the conflicts array is to facilitate switching between the two packages. If A depends on X and Y provides X, then without the conficts array set, switching to Y would require separate actions of removal of X and installation of Y. But the removal of X is (near) impossible because A depends on X. With Y's conflicts array containing X, installing Y will offer to replace X with Y in one shot. Cheers David
participants (4)
-
buckket
-
David Phillips
-
Martin Kühne
-
Pedro A. López-Valencia