You are not logged in.

#1 Yesterday 12:40:17

gameslayer
Member
Registered: 2023-09-24
Posts: 31

set package provider on package

Hey everyone I am trying to figure out how to set a provider for dependency on a package and was hoping one of you smart people could help me figure it out big_smile

I maintain the package gzdoom-bin and I want it to ask if I want to use zmusic or zmusic-bin and I tried 'zmusic>=1.1.14' in the dependencies but I don't want to push the package changes until I know for sure it is working otherwise it will cause package issues.

Is this correct?

Last edited by gameslayer (Yesterday 12:41:04)

Offline

#2 Yesterday 12:58:47

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 554
Website

Re: set package provider on package

So you just want to have a dependency on zmusic or zmusic-bin or -git?
if so:
* add zmusic as a dependency
* tell the maintainers of zmusic-bin to add provides=("zmusic") (Interestingly it doesn't have this already but should, the -git version does)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#3 Yesterday 15:00:11

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Ahh I see that's how you do it, I am also the maintainer of zmusic-bin so I shall do that. Thanks for letting me know!

Offline

#4 Yesterday 17:04:16

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 554
Website

Re: set package provider on package

don't forget to mark the thread as solved by prepending a [SOLVED] to the OP title by editing it.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#5 Today 02:28:16

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Hmm I tried that but it still seems to grab zmusic and not ask me a providers for zmusic, did I do something wrong?

https://aur.archlinux.org/cgit/aur.git/ … gzdoom-bin
https://aur.archlinux.org/cgit/aur.git/ … zmusic-bin

Last edited by gameslayer (Today 02:30:55)

Offline

#6 Today 07:05:02

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 554
Website

Re: set package provider on package

What AUR helper do you use? paru will let you select.
I think this is intended tho, let users go with the default and only change if they want to. I think your part is done.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#7 Today 08:26:35

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Pamac but I was investigating jellyfin-git on how it was doing it and it does ask me the provider on that package and I even tested to see if jellyfin would ask me for the provider on yay and it and it does for dotnet-sdk but is a makedepend as it has to buil d from source.

I must have done something wrong if it still isn't asking me and defaulting to zmusic and not asking me to pick from zmusic and zmusic-bin

Can you please look at my pkgbuild files which I I provided links to?

Last edited by gameslayer (Today 09:08:32)

Offline

#8 Today 09:10:37

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,225

Re: set package provider on package

You should remove the conflict with gzdoom-git & zmusic-git as best practice is to conflict with non-git and let pacman handle the rest .

Keep in mind that pacman only looks for providers that satisfy a depend in repos configured in pacman.conf .

Yay and paru probably use custom code to treat aur as a repo, pamac likely doesn't deviate that far from pacman behaviour .


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

#9 Today 09:15:17

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Oh ok I'll remove those if they aren't needed  also

Yay and paru probably use custom code to treat aur as a repo, pamac likely doesn't deviate that far from pacman behaviour .

The same thing happens on Pamac and it asks me for the provider on packages setup for it like jellyfin-git as one example of many and like it does on yay and other AUR helpers. I obviously haven't setup my own package/s properly to do it and I am wanting to figure out what I did wrong, learn from it and correct it so I can have my package ask if I want to use zmusic or zmusic-bin when you install it. smile

Last edited by gameslayer (Today 09:15:32)

Offline

#10 Today 09:28:59

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,225

Re: set package provider on package

pacman / makepkg can't do that UNLESS all those packages are in a configured .

Setup a custom local repo, add zmusic and the other packages that provide it to that repo .

Then run pacman -S zmusic , if it asks you to select one of them, the packages are fine.

If you feel some aur helper like pamac should be able to do the same for non-repo/aur packages, you can try opening a bug report or feature request with them.

Before doing that I advise you to (re-)read https://wiki.archlinux.org/title/AUR_helpers and think about the text in the colored boxes .


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

#11 Today 09:32:59

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

I'm doing this in the AUR helper not with pacman or makepkg

I'm sorry but I think there is a communication issue, I already told you pamac does ask for package providers on packages that are configured correctly but the issue is with my package/s and I am trying to figure out how to do it correctly and learn how to do it on my package like other AUR packages have.

Offline

#12 Today 10:05:20

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,225

Re: set package provider on package

There does seem to be a communication issue.

if it works with makepkg/pacman but not with an aur helper, the problem is with the aur helper .

In case it works with yay/paru/pamac/some-other-helper but fails with pacman/makepkg , the package is faulty .

Read https://wiki.archlinux.org/title/AUR_su … s#Requests and notice it doesn't mention aur helpers of any kind at all .


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

#13 Today 10:13:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,294

Re: set package provider on package

gameslayer wrote:

Hmm I tried that but it still seems to grab zmusic and not ask me a providers for zmusic, did I do something wrong?

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

Offline

#14 Today 10:21:31

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Lone_Wolf wrote:

There does seem to be a communication issue.

if it works with makepkg/pacman but not with an aur helper, the problem is with the aur helper .

In case it works with yay/paru/pamac/some-other-helper but fails with pacman/makepkg , the package is faulty .

Read https://wiki.archlinux.org/title/AUR_su … s#Requests and notice it doesn't mention aur helpers of any kind at all .

I'm sorry but your still not understanding me, I already told you that it does work on the package manager and AUR helpers like Pamac and yay and I told you that it works with jellyfin-git package as a example but I want to know how that AUR package and others are able to do this so I can also learn how to do it

Offline

#15 Today 10:25:08

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

Please look at jellyfin-git as a reference of example, it is able to give the user a option of picking what package variant of dotnet on the AUR to choose from and I want to do the same for the AUR packages zmusic, zmusic-git and zmusic-bin but I don't know how to do it like the jellyfin-git AUR package has and would like the AUR helpers to give the user the option from the pkgbuild file on my gzoom-bin package

Offline

#16 Today 10:27:19

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 554
Website

Re: set package provider on package

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

@gameslayer I think your question has been answered, right? If that is so, prepend a [SOLVED] to the OP by editing it.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#17 Today 10:33:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,294

Re: set package provider on package

gameslayer wrote:

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

Please look at jellyfin-git as a reference of example, it is able to give the user a option of picking what package variant of dotnet on the AUR to choose from and I want to do the same for the AUR packages zmusic, zmusic-git and zmusic-bin but I don't know how to do it like the jellyfin-git AUR package has and would like the AUR helpers to give the user the option from the pkgbuild file on my gzoom-bin package

That's not how any of this should work, if any helper does that, it's just helper bullshit and not desired behavior.

Offline

#18 Today 10:33:54

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

jl2 wrote:

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

@gameslayer I think your question has been answered, right? If that is so, prepend a [SOLVED] to the OP by editing it.

No it has not and it has not sorry, I have not gotten a answer on how to do what jellyfin-git (as a reference) and other packages  do as I really would like to figure out how to take advantage of this feature in pacman/AUR packages

Jellyfin-git log as a example

pamac install jellyfin-git
Warning: jellyfin-git is only available from AUR
Preparing...
Cloning jellyfin-git build files...
Generating jellyfin-git information...
Checking jellyfin-git dependencies...
Checking dotnet-sdk-2.1 dependencies...
Checking dotnet-sdk-2.2 dependencies...
Checking dotnet-sdk-6.0-bin dependencies...
Checking dotnet-sdk-3.0 dependencies...
Checking dotnet-sdk-2.2-vs2017 dependencies...
Checking dotnet-sdk-7.0-bin dependencies...
Checking dotnet-sdk-bin dependencies...
Checking dotnet-sdk-preview-bin dependencies...
Checking dotnet-sdk-8.0-bin dependencies...
Checking dotnet-sdk-5.0-bin dependencies...
Checking dotnet-sdk-3.1-bin dependencies...
Checking dotnet-sdk-6.0.110-bin dependencies...
Checking dotnet-sdk-8.0.300-bin dependencies...
Checking dotnet-runtime-6.0-bin dependencies...
Checking dotnet-runtime-preview-bin dependencies...
Checking dotnet-runtime-2.1 dependencies...
Checking dotnet-runtime-2.2 dependencies...
Checking dotnet-runtime-3.0 dependencies...
Checking dotnet-runtime-7.0-bin dependencies...
Checking dotnet-runtime-3.1-bin dependencies...
Checking dotnet-runtime-bin dependencies...
Checking dotnet-runtime-8.0-bin dependencies...
Checking dotnet-runtime-5.0-bin dependencies...
Checking aspnet-runtime-2.1 dependencies...
Checking aspnet-runtime-2.2 dependencies...
Checking aspnet-runtime-3.0 dependencies...
Checking aspnet-runtime-7.0-bin dependencies...
Checking aspnet-runtime-3.1-bin dependencies...
Checking aspnet-runtime-preview-bin dependencies...
Checking aspnet-runtime-8.0-bin dependencies...
Checking aspnet-runtime-bin dependencies...
Checking aspnet-runtime-5.0-bin dependencies...
Checking aspnet-runtime-6.0-bin dependencies...
Checking dotnet-targeting-pack-6.0-bin dependencies...
Checking dotnet-targeting-pack-7.0-bin dependencies...
Checking dotnet-targeting-pack-bin dependencies...
Checking netstandard-targeting-pack-bin dependencies...
Checking aspnet-targeting-pack-bin dependencies...
Checking dotnet-targeting-pack-preview-bin dependencies...
Checking dotnet-targeting-pack-8.0-bin dependencies...
Checking dotnet-targeting-pack-5.0-bin dependencies...
Checking dotnet-targeting-pack-3.1-bin dependencies...
Checking dotnet-host-bin dependencies...
Checking dotnet-host-preview-bin dependencies...
Choose a provider for dotnet-sdk>=9:
1:  dotnet-sdk-bin          9.0.1.sdk102-2  AUR
2:  dotnet-sdk-preview-bin  9.0.0.sdk100-1  AUR

Enter a number (default=1): 

I want to figure how to take advantage of this same feature of having a package provider and give the user the choice of zmusic, zmusic-git and zmusic-bin

Not to sound rude but why are you in such a rush to close it?

Last edited by gameslayer (Today 10:36:25)

Offline

#19 Today 10:36:00

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Scimmia wrote:
gameslayer wrote:

This is normal, it should always default to the regular package. The variants like the -bin package can be done manually by the user.

Please look at jellyfin-git as a reference of example, it is able to give the user a option of picking what package variant of dotnet on the AUR to choose from and I want to do the same for the AUR packages zmusic, zmusic-git and zmusic-bin but I don't know how to do it like the jellyfin-git AUR package has and would like the AUR helpers to give the user the option from the pkgbuild file on my gzoom-bin package

That's not how any of this should work, if any helper does that, it's just helper bullshit and not desired behavior.

if that is so then how is jellyfin-git and other packages doing this? can you explain by looking at the pkgbuild file?

https://aur.archlinux.org/cgit/aur.git/ … llyfin-git

I have given a log example of installing jellyfin-git with a AUR helper and what it does.

Offline

#20 Today 10:39:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,294

Re: set package provider on package

Those packages aren't doing it. It's purely up to the logic of whatever helper.

Offline

#21 Today 10:41:53

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Scimmia wrote:

Those packages aren't doing it. It's purely up to the logic of whatever helper.

Hmm alright can you explain how to use the logic of the helper? multiple AUR helpers seem to support this  and I would love to take advantage of it

Offline

#22 Today 10:43:11

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,294

Re: set package provider on package

Take advantage of what's likely a bug? Don't.

Offline

#23 Today 10:46:26

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

I'm sorry but you seem to be incorrect, it isn't a bug

https://bbs.archlinux.org/viewtopic.php?id=97373

Packages have an attribute called 'provides', which serves to simplify dependency handling and deprecation of older packages. Take for example the case of 'msmtp', 'postfix', and 'ssmtp'. All three of these packages provide 'smtp-forwarder'. This is handy because it allows another package which requires the functionality of an smtp agent to depend on 'smtp-forwarder' and not worry about depending one of these specific forwarders.

This can also be used when an important package changes names. For example: linux-api-headers, which used to be called kernel-headers. When this package changed names, the old name was moved the provides attribute. Someone who wants to install the package 'kernel-headers' but didn't know about the name change can still install linux-api-headers by providing the old name. This, again, allows simpler dependency handling as any package that might depend on kernel-headers doesn't need to be updated to depend on linux-api-headers instead.

Last edited by gameslayer (Today 10:50:18)

Offline

#24 Today 10:49:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,294

Re: set package provider on package

The only thing even close in that thread is one mention of a virtual dep. None of that applies to this discussion at all. Stop overcomplicating things, package it correctly and let the user do what they want to do.

Offline

#25 Today 10:52:15

gameslayer
Member
Registered: 2023-09-24
Posts: 31

Re: set package provider on package

Scimmia wrote:

The only thing even close in that thread is one mention of a virtual dep. None of that applies to this discussion at all. Stop overcomplicating things, package it correctly and let the user do what they want to do.

but it does

Packages have an attribute called 'provides', which serves to simplify dependency handling and deprecation of older packages. Take for example the case of 'msmtp', 'postfix', and 'ssmtp'. All three of these packages provide 'smtp-forwarder'. This is handy because it allows another package which requires the functionality of an smtp agent to depend on 'smtp-forwarder' and not worry about depending one of these specific forwarders.

This can also be used when an important package changes names. For example: linux-api-headers, which used to be called kernel-headers. When this package changed names, the old name was moved the provides attribute. Someone who wants to install the package 'kernel-headers' but didn't know about the name change can still install linux-api-headers by providing the old name. This, again, allows simpler dependency handling as any package that might depend on kernel-headers doesn't need to be updated to depend on linux-api-headers instead.

Look if you don't know how it works that ok, I am also trying to learn but don't try and claim I'm trying to over complicate things or claim I'm wanting to package things wrong when you don't know how it works yourself.

Offline

Board footer

Powered by FluxBB