pikaur
pikaur copied to clipboard
Resolving indirect AUR dependencies (via `Provides` field)
Hey!
Trying to install ros-indigo-desktop-full (https://aur.archlinux.org/packages/ros-indigo-desktop-full) yields that python2-catkin-pkg cannot be found in AUR and hence ros-indigo-desktop-full cannot be installed.
Two things:
- It would be nice if pikaur would show that the missing dep is a dep of ros-indigo-catkin
- It actually is possible to know for pikaur that python2-catkin-pkg is being provided by python2-catkin_pkg since it's being listed explicitly in other packages of the dependency chain, hence it should be possible to solve the dependency chain for ros-indigo-desktop-full all in all
the thing is what search in AUR's rpc is not indexing Provides field so the only thing which i can do here -- get the full package list from AUR (like in -Ss without args) and next search through local 'mirror' of AUR db for such packages
but it takes about half minute, so mb before going to that type of search to prompt user for confirmation (like Package not found in AUR. Try to sync AUR locally to analyze 'Provides' sections of the packages?)
Do any of you two know PHP? Sounds easier to file a patch to aurweb than come up with a good workaround here :smile:
https://bugs.archlinux.org/task/49090
Also what is your definition of "local mirror"? Do you retrieve packages.gz to query the AUR for all of them and merge the output somehow? IDK...
i don't know php but i think i can add to RPC one more filter criteria, as name and name-desc as it have now to have also either provides or name-desc-provides (probably someone else should come up with a better name )
i didn't noticed your edits on the original comment:
regarding local mirror, yes, see here: https://github.com/actionless/pikaur/blob/master/pikaur/aur.py#L306-L310
@actionless Reference: https://github.com/AladW/aurutils/issues/10#issuecomment-370270445
The first part explains how aurman fetches packages and thus gets the needed information. May be interesting for you.
@AladW i had a moment to have a look on https://git.archlinux.org/aurweb.git/tree/web/lib/aurjson.class.php it doesn't look complicated, what is the procedure to submit a patch?
or alternative approach to fixing that on AUR RPC side could be when searching by name match not only Name field but also Provides field
(but that should make search by name slower)
@actionless the procedure is to send your patch to aur-dev where it can be merged after discussion. If you haven't used git send-email before, see https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/
so i can't start a discussion topic / send patch without subscribing to the whole mail list?
I don't recall if you have to be actually subscribed to send messages. If you do and you don't want to recieve other topics, you can disable recieving them in the mailman settings.
ok, i'll try doing that tonight or so
@AladW how do you think which of the approaches will be more acceptable:
- adding
name-desc-providesfilter - adding
providesfilter - when searching by
namematch not only Name field but also Provides field - mb smth else?
Personally I would prefer the third option, since I'm not sure what the benefits of an additional filter over a transparent approach are. I don't speak for the AUR development team though, so I'd propose these options on aur-dev as well. (the list is equally suited for discussion and posting of patches)
@AladW i've submitted a message there but it didn't appeared here: https://lists.archlinux.org/pipermail/aur-dev/2018-March/date.html
could it be because my e-mail address is not subscribed to the mail list?
Possible, you should have had a rejection mail in that case. Try subscribing then posting it (as mentioned, you can opt-out to receive messages from the list while still being subscribed)
i haven't received rejection neither, but i'll try to subscribe and send the message again
oh, or i can just parse AUR html web page which lists all the package alternatives :dancing_women:
...please don't.
@AladW see last message from Florian in the mail list -- such kind of control freaks is the reason why i didn't wanted to touch the mail list even with a long stick
You shouldnt take it personally - the Arch mailing lists have a long history with email issues so people will remind you immediately. Anyway as you have may have noticed there's a positive response to the proposed changes so it's worthwhile to continue working on them. :smiley:
don't worry, i'm not giving up ;-)
just mentioned why i so wanted to avoid that initially
There are provides problems too when pikaur try to delete the make dependencies after finished making a package:
(here python-distribute is provides by python-setuptools)
@XavierCLL could you check this again with the latest git version of pikaur?
not yet, same issue using Pikaur 0.8+19+g094ee87
@XavierCLL pushed more fixes
perfect, the last commit fixed the problem, thanks @actionless
@actionless, I've looked at the following patch: https://transfer.sh/L3H4Z/0001-feat-rpc-return-providers-packages-when-querying-by-.patch
I think it's actually a very bad idea to alter the existing name and name-desc fields. People are already working with that, and if you change it, many things might break, since you are changing what those fields do. Everybody, who is working with AurJson needs to change existing code, to adapt to the new usage of the fields. Such API changes should really never, ever happen.
i did proposed another alternatives but this one was chosen, feel free to file a patch implementing that in an other way
Simple solution: bump the RPC version to 6. People who want the old API can keep using 5.
What about adding this to info? info allows multiple arguments, so say a package you're fetching the dependencies for has 10 AUR dependencies. Before you would just do 1 info request with those 10 packages. Now you would have to do an individual search request for every dependency then get info from then. Which brings the request count up to 11.
Not to mention search is for, well searching. It does not look for exact names. So when you have the dependency foo and you want to find packages that also provide foo after you preform the search on the rpc you would have to check each package to see if they actually provide foo, or just happen to have a similar name.
I think this does belong in name and name-desc for -Ss type searching but for actual dependency resolving this should also also be added to info.