pacseek icon indicating copy to clipboard operation
pacseek copied to clipboard

[feature request] List optional dependencies when installing packages

Open Xionical1 opened this issue 2 years ago • 6 comments

I find myself opening multiple instances to reference optional dependencies and install them manually. I see online there are ways of listing optional deps but not an easy way of installing multiple at a time with help to list them as dependencies. GUI package managers have this feature. (See Pamac)

Xionical1 avatar Nov 19 '23 20:11 Xionical1

Hi @Xionical1,

pacseek does not aim to be a package manager. So when you install a package, you'd want to be prompted to (select and) install any optdepends along with it? -> That request might be better suited at the AUR helper you're using.

moson-mo avatar Nov 19 '23 22:11 moson-mo

That is exactly the functionality I was hoping for, and yes this would probably be better suited in a package manager like yay. However I cannot find the above functionality in anything cli based without typing out every package without an easy way of telling what the optional dependencies are, and if they are installed. If there is something described, please let me know! Otherwise I'm gonna take a crack at adding the functionality to this project. Thank you for your response.

Xionical1 avatar Nov 20 '23 04:11 Xionical1

without typing out every package without an easy way of telling what the optional dependencies are, and if they are installed.

You could customize the install command in the pacseek settings to something like:

yay -S {pkg}; pacman -Qi {pkg}; read;

So after installation it would show that information (-Qi includes a list of optdepends and whether they are installed or not)...

moson-mo avatar Nov 20 '23 13:11 moson-mo

Thank you for your I.T. assistance. I just checked out the -Qi option, and added your commands to pacseek. While this is indeed useful, I was hoping for a slightly more interactive way of installing these optional deps. I have slightly modified your project to include something similar to pacman -Qi into the info panel in the fork I made of your project. Nothing fancy as I have never coded in GO before. I will check out the yay source to see if it would be better off including more interactivity into their code rather than this project, since it might be out of scope. Thank you for your time.

Xionical1 avatar Nov 21 '23 19:11 Xionical1

Hey @Xionical1

I see. I'm thinking about making it visual what deps (maybe not only the optional ones, but any of them) are installed already (maybe with different colors). Now it's actually a bit more tricky then just checking with the "isinstalled" function: dependencies might be a "virtual package" or ".so name" as well and even contain version constraints and not only just plain pkgname's, so you'd need to check against "provides" actually.

I still think the logic of "checking and asking for additional optdepends installation" is kinda AUR-Helper territory (and would also benefit a much broader userbase than the few "pacseekers" out there 😉). A quick search shows there were some thoughts about this already (for yay in this case): https://github.com/Jguer/yay/issues/1368

moson-mo avatar Nov 21 '23 20:11 moson-mo

Ill check out "provides" thank you for your input. I am kind of firing from the hip here as I also only spent a couple hours on it and also don't really know the inter workings of package management. I did have an idea to list dependencies as a tree like structure when selecting and hovering over certain packages. (See image) MockTreePacseek This might be overkill, and something you would rather tab over to the info panel to see. Also this kind of feature would really only be useful if you could interact with the items in the tree (Such as selecting them for install).

I have seen that issue on yay, and that is kind of what I imagined when thinking of this feature. It would be very similar to the feature to view or edit package builds ([A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4) prompt in yay)

Xionical1 avatar Nov 21 '23 20:11 Xionical1