You are not logged in.
I maintain backintime in the AUR. Upstream (Debian based) has listed some optional deps that can all satisfy a dependency, but the user needs to only select one of them. How can I mirror this in my PKGBUILD?
Example:
Qt4 GUI dependencies:
kdesudo | gksu...
Recommends:
kompare | meld
python-secretstorage | python-keyring-kwallet | python-gnomekeyring
So either kdesudo or gksu will work which I believe converts into Arch packages: 'kdesu' or 'gksu'. Therefore, users may use either package, but both are not needed.
Note - I have seen how Arch can have multiple packages that provide something like libgl for example, but in that case, all 4 providers have that hard-coded into their respective PKGBUILDs, eg. 1) mesa-libgl 2) nvidia-304xx-libgl 3) nvidia-340xx-libgl 4) nvidia-libgl in this case.
Others per the REAME:
Either kompare or meld will work which I believe converts into Arch packages: 'kdesdk-kompare' or 'meld'.
Either python-secretstorage or python-gnomekeyring will work but I believe we only have 'python-secretstorage' in the official repos.
Last edited by graysky (2015-01-17 15:22:36)
Offline
I'd go with declaring both in optdepends and printing an install message telling the user that they need one or the other (or both).
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I'd go with declaring both in optdepends and printing an install message telling the user that they need one or the other (or both).
I could do that for the optdepends, but there is a depends either-or-set as well that I cannot automate yet... (gksu or kdesu).
Last edited by graysky (2015-01-17 12:42:31)
Offline
It's already a split package - split packages can have separate dependencies for each package.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It's already a split package - split packages can have separate dependencies for each package.
Yes, but one of the two in the split require either gksu or kdesu. How can I allow for this either-or dependency?
Offline
A possibilty might be to add code to create a virtual package for graphical-su .
Here's an example of how this could work in pseudo-code :
package_backintime_detect_graphical_su_dummy()
{
_gksu_installed = false; kdesu_installed = false;
If gksu is present then _gksu_installed = true ;
if kdesu is present then _kdesu_installed = true;
If _gksu_installed OR _kdesu_installed then provides = backintime_graphical_su
}Add a depend on backintime_graphical_su to the gui program and some comments to clarify how to build.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The official repos do this by making all affected packages provide some generic virtual package e.g. jre7-openjdk provides java-runtime. In an AUR context, this is clearly not applicable, so the least worst workaround is to pick one as the hard dependency and inform your users that they can change it if they want to.
Offline
@tomk - Agreed... I think using some commented text in the PKGBUILD itself might be a good idea failing any official method someone has yet to make me aware of.
Last edited by graysky (2015-01-17 14:13:04)
Offline
I agree that a comment is the best way to go here.
depends=('gksu') # change to kdesu if wantedOr you could ask for a provides to be added to kdesu and gksu in the repos.
This is a problem that pops up every year or two... I'm not sure what a good solution we could implement in makepkg is.
Offline
Thanks Allan. Might open a FS against the two asking for the meta target (or whatever it's called).
EDIT: https://bugs.archlinux.org/task/43489
Last edited by graysky (2015-01-17 15:31:22)
Offline