You are not logged in.
Frequently in running pacman, the package offers typically (example):
Optional dependencies for blahpack
pulseaudio: Audio support [installed]
speech-dispatcher: Text-to-SpeechI may be blind and illiterate, but reading the man pages for pacman and paru do not provide the answer:
How do I get the software to AUTOMATICALLY build speech-dispatcher? Or am I making an enhancement request?
Last edited by OrigBitmancer (2022-02-10 13:55:30)
Offline
I'm assuming you want to install the package, like how it says pulseaudio is installed. To do that, just run this command
$ sudo pacman -S speech-dispatcherI do feel like that isn't what you want though...
Last edited by thehexagon (2022-02-09 05:09:02)
NZ - UTC+12, or UTC+13 (depends on DST) | HP ENVY x360 2-in-1 Laptop 15-EW0009TX
Offline
Offline
No, @thehexagon, that is not what I want. You are right.
This indicates that the answer has been looked around since 2013. That is Not Good.
OTOH, it also shows that the pacman(8) code itself is capable of determining the "optional requirement" in several places.
I should get in touch with the maintainers, and perhaps contribute a code snippet.
Thanks to both of you for chiming in. I shall close this for now. If I get response from the maintainers, I shall update it.
Offline
Pacman doesn't build anything.
If you're asking how to make it automatically install optional deps, it can't.
Online
Pacman doesn't build anything.
If you're asking how to make it automatically install optional deps, it can't.
Well, this was not helpful. Perhaps a semantic issue? Common English slang bias?
If you would like me to rephrase, "build speech-dispatcher" would become "command the construction and installation of speech-dispatcher". Is that better?
Offline
The "construction", or building the package, isn't done by pacman at all. It takes pre-build, binary packages and installs them, that's all.
Online
The "construction", or building the package, isn't done by pacman at all. It takes pre-build, binary packages and installs them, that's all.
Since my verb choice and noun choice are obviously bothering you, please suggest corrections.
Offline
How do I get the software to AUTOMATICALLY build speech-dispatcher? Or am I making an enhancement request?
All packages in the official repos have already been 'built', but this is nothing to do with pacman.
All pacman does is download already built packages and install them onto your system.
If you want to install the speech-dispatcher package then simply run the command...
pacman -S speech-dispatcherOffline
OrigBitmancer wrote:How do I get the software to AUTOMATICALLY build speech-dispatcher? Or am I making an enhancement request?
All packages in the official repos have already been 'built', but this is nothing to do with pacman.
All pacman does is download already built packages and install them onto your system.
If you want to install the speech-dispatcher package then simply run the command...pacman -S speech-dispatcher
Oh, dear.
I encountered this situation when rebuilding a system. Inside the report of execution of pacman, there were a number of Optional Dependencies for many packages. In many cases, adding those packages would be desirable enhancements to extant software. I wanted (at least) to have pacman create a list of those packages, so I could consider adding them to the system.
In the case I presented, I wanted pacman to cause
pacman -S speech-dispatcherto happen. It was merely an illustration.
Since I had not misinterpreted an option that already existed, and there was not heated discussion about adding this feature to the pacman command, others pointed me to more helpful discussion.
There seems to be a game of "troll the American" going on, here. It is very unprofessional. Please stop?
If I am wrong, then please accept my apologies.
Offline
There seems to be a game of "troll the American" going on, here. It is very unprofessional. Please stop?
There has been absolutely nothing of the sort that that would suggest that happening here. We have users from all over the globe.
As explained in the provided documentation for Arch Linux...
It is targeted at the proficient GNU/Linux user,
A proficient Linux user isn't someone that doesn't know the difference between binary distros and source based distros, Everything in this thread has been informational, none of it has been negative.
I do apologise if you have taken any of the posts in this thread the wrong way.
Offline
I may be blind and illiterate, but reading the man pages for pacman and paru do not provide the answer:
That's correct this is like other people already said not pacman's case.
You look at the PKGBUILD manual.
It clearly says 'optdepends' are not essential to base functionality.
If you think this is wrong you can create your own PKGBUILD and add whatever you like to the depends array:-)
Offline
I will also say that unconditionally installing all optional deps is a bad idea. Take dkms for example, you install it and it pulls in all the headers for every kernel in the repos? Nope.
Optional deps are meant for you to read and evaluate.
Online
Odd thread. Indeed no one is being "negative" but there does seem to be a lot of avoidance of the actual question which is whether there is a way to have optional dependencies automatically installed. The answer to that is simply that at present, there is not. There are a number of ways this could be scripted into a pacman wrapper, but pacman - as far as is documented - provides no such option.
However, another oddity is from the link JWR provided:
Other Ideas
- A flag/configuration option to install a packages optdepends by default [done]
done? That doesn't appear to be done. Not unless there is an undocumented flag/configuration for pacman. But this is what the OP is asking about.
EDIT: oops. Towards the top of that page it defines "[done]" as meaning it is implemented in a separate branch of a specific repo of the pacman code.
Last edited by Trilby (2022-02-09 23:52:44)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well, "doesn't know the difference between binary distros and source based distros" is somewhat overbearing, if not insulting.
None of the posts since #4 has made a direct contribution. Here is one:
from https://confluence.jaytaala.com/display … ed+distros
sudo pacman -S --asdeps --needed $(pacman -Si wine | sed -n '/^Opt/,/^Conf/p' | sed '$d' | sed 's/^Opt.*://g' | sed 's/^\s*//g' | tr '\n' ' ')
Replace pacman -Si wine with pacman -Si <package> where <package> is the package you want to install all the optional dependencies for.
commenter wrote:Unfortunately the code you suggested also removes the first optional dependency due to the greedy match of the ':'. Also you leave the description in, which messes things up a bit, and the None keyword if there are no dependancies. A better way, which also allows for you to specify multiple packages, and specify packages to ignore is:
sudo pacman -s --asdeps --needed $(echo $(pacman -Si <SPACE SEPARATED LIST OF PACKAGES> | sed -n '/^Opt/,/^Conf/p' | sed '$d' | sed 's/\(^Opt[^:]*:[[:blank:]]\)//g' | sed 's/: .*$//g' | sed 's/^Conflicts With.*$//g' | sed 's/^None.*$//g' | sed 's/^\s*//g'| tr '\n' ' ' | sed 's/ / /g') | sed 's/<PACKAGE TO IGNORE 1>//g' | sed 's/<PACKAGE TO IGNORE 2>//g' <REPEAT SED FOR ALL IGNORED PACKAGES> | sed 's/<PACKAGE TO IGNORE n>//g' )
ajw107 (Alex)
Perhaps, it would help to have the optdeps put out at the end of a multiple-package command, instead of the middle? Maybe that is my ultimate request.
As
Optional deps are meant for you to read and evaluate.
Which would be served by that output.
Offline
That chain of sed commands quoted above is pretty ugly. If you really want to do something like that use expac:
pacman -S --asdeps --needed $(expac -S %o wine)If you are really set on parsing the pacman output with sed, then the following would work:
pacman -S --asdeps --needed $(pacman -Si wine | sed -n '/^Optional Deps/{s/[^:]*: \([^:]*\).*/\1/p;:a;n;/^[A-Z]/q;s/:.*//p;ba;}')But if this is for an already installed package, it'd be easier to parse the local desc file:
sed -n '/%OPTDEPENDS%/{:a;n;/^$/q;s/:.*//p;ba;}' /var/lib/pacman/local/${pkgname}-${pkgver}/descLast edited by Trilby (2022-02-10 00:04:48)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Perhaps, it would help to have the optdeps put out at the end of a multiple-package command, instead of the middle? Maybe that is my ultimate request.
While I think this is nitpicking you forget the first part of Scimmia's post(& agree with that) and I forgot to add to mine
I will also say that unconditionally installing all optional deps is a bad idea.
So you evaluate if you need it and explicitly install it.
Offline
The ultimate result is "make pacman optionally place a list of the optional dependencies in a file"
so that the result can be edited for unnecessary or unwanted packages.
Offline
expac %o > file"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
expac %o > file
YES!!! That is it!
After several tries to find out what I needed, I reduced the question to essence, and you answered.
I will restate the title as “List of optional dependencies after large update?”
Thanks again, Trilby!
Offline