I am trying to script the installation of optional "dependencies" depending on what other packages are installed in an Arch Linux system. I can use pacman -Q to tell me if a package has been installed either directly or as a dependency, but this fails if the package is "installed" via provides in the PKGBUILD. How can I determine if a package that provides a package has been installed? The specific issue I have is I want to install kile if both kdebase-workspace and texlive-core are installed. The issue is that I cannot pick up that the AUR texlive-dummy package is providing texlive-core.


You can use package-query to search packages by their 'provides' property. E.g.:

$ package-query --qprovides 'mplayer=36265' -Q -f "%n"

will list all installed packages that provides 'mplayer=36265'.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.