Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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