> pacman -R tk
checking dependencies...
:: git optionally requires tk: gitk and git gui
:: python optionally requires tk: for tkinter
:: python2 optionally requires tk: for IDLE
:: r optionally requires tk: tcl/tk interface
Packages (1): tk-8.5.12-1
> pacman -S python
...
(1/1) installing python [######################] 100%
Optional dependencies for python
tk: for tkinter [installed]
sqlite [installed]
> pacman -Qi tk
Name : tk
Version : 8.5.12-1
...
Required By : None
Optional For : git python python2 r
The further improvements on the wiki page will likely wait until 4.2.
]]>@Trillby
I do agree with you, I meant feature request, but as it's reported on a bug tracker ... well ...
Edit:
The topic Awebb pointed to contains in fact, in the last post a link to : https://wiki.archlinux.org/index.php/Us … OptDepends
A page where Allan describe some of the behavior he implemented about OptDepends, some of these seems relevant to my problem and will maybe be released with pacman 4.1.
About tl;dr. I understand your point. But I wrote it to help people who will read the post to very quickly determine if they could have an answer or not.
So, if they do, I think they should read the entire post to know the entire context, or more generally.
But yes, for a 4 lines post, I agree this seems a bit awkward and maybe insulting, and the topic title is designed for the exact same purpose.
Edit: A bug report seems inappropriate. If feature requests go on the same tracker, a feature request would make sense as that's what this is. There is no bug when a tool does not do something it was never intended to do. EDIT AGAIN: As Awebb pointed out there already is a bug report. While I stand by my logic that I don't think it should be called a bug, if there already is a bug report on it, you certainly don't need to add another.
]]>I think I will try to change the PKGBUILD, but I am pretty sure it will break on next update.
Should I post a bug report ?
Now that I have been helpful and all, I want you to know, that this entire "tl;dr" business, that infects the web from reddit, is percieved to be insulting by quite a few intelligent people. It creates the feeling, that your text before that tag is irrelevant. Instead you should chose your words carefully in the actual text.
]]>Imagine you have packages A B and C, C is a dependency of both A and B, but for whatever reason you install C first with "--asdeps", then you install A and B. If you later remove A with "pacman -R A" no dependencies will be removed, but if you use "pacman -Rsn A" A will be removed as will all of it's dependencies that are not needed by any other package. So in this case C would still not be removed as B still needs it. If you then "pacman -Rsn B" B and all it's dependencies including C would be removed.
That is how it works for normal dependencies. I don't believe optional dependencies have database entries in the "required by" field as they are not required, they are optional. So if C were only an optional dependency of A and B, it would never be removed by removing A and/or B (AFAIK).
----
If you install libva-intel-driver with "--asdeps" then it will likely show up in "pacman -Qdt" output. If you later install anything that has libva-intel-driver as a regular dependency, then later remove that package with "pacman -Rsn" libva-intel-driver will be taken away with it - it is doubtful you would want this. So don't install optional dependencies "--asdeps"
They are optional, you are opting for them, install them normally.
----
Alternately, and as a direct answer to your real question, I believe the only way to do with would be to modify the package info of libva to switch libva-intel-driver from optional to regular dependency. This would be easy to do, but I don't know if it's easy to automate, nor would it survive udates to libva, it'd have to be redone.
]]>As stated in the title, I don't know how to install optionnal dependencies : (let's take an example)
I noticed that with libva comes two optional dependencies libva-intel-driver and libva-vdpau-driver, and as I have an intel graphic card, I would like to install libva-intel-driver.
But to keep my package tree quite clean, I would like to install it as a dependency of libva, this way, if someday I want to remove libva, libva-intel-driver will be removed too.
In the pacman manual, the option --asdeps seems to be useful to install a package as a dependency (but it doesn't seems to need to specify which package it is a dependency for).
So my question is, does this mean that libva-intel-driver will be removed when I don't need libva anymore ?
And more generally, how pacman manage dependency ?
As a matter of fact, I tried to install and then remove libva-intel-driver, but it never said that libva might need it.
tl;dr : I want to install an optionnal dependencies exactly like a regular dependencies would be installed : how could I do that ?
Edit:
the answer is here : https://wiki.archlinux.org/index.php/Us … OptDepends