You are not logged in.
Pages: 1
Topic closed
I want to list all the packages that depend on QT. Is there a command for this?
If not, i think it'd be useful to have something like pacman -Qr package-name to list packages that depend on package-name (Like in the "Required By" section of http://archlinux.org/packages/extra/i686/qt/)
Last edited by trusktr (2010-11-12 20:38:06)
joe@trusktr.io - joe at true skater dot io.
Offline
pacman -Qi qt
pacman -Sii qt
worksforme(tm)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
pacman -Qi <package name> will list the information that the packages site shows, including "Required by".
Running it for qt shows me acetoneiso2, smplayer and scribus in said field, for example.
Is this what you need?
Offline
Aha! GRem and Mr.Elendig, i just noticed that pacman -Qi package-name shows only the packages that depend on "package-name" only if they're installed in your system!
I think this is true because GRem, you said yours shows acetoneiso2, smplayer and scribus in the Required By field, but mine doesn't show any of those three. Mine shows "hedgewars lib32-qt lmms qjackctl qtractor telepathy-qt4", which are all installed on my system.
What a nice little discovery. So, here's a possible command to output only packages that depend on a given package (qt in this example):
pacman -Qi qt | grep "Req" | sed -e 's/Required By : //g'
Works beautifully!
Last edited by trusktr (2010-11-12 20:58:33)
joe@trusktr.io - joe at true skater dot io.
Offline
I second Mr.Elendig - 'pacman -Sii qt' is what you need.
Offline
Yeah, indeed the -Sii command shows all packages that require qt. I was looking just for the ones on my system. In this case -Qi did the trick, and i was able to extract them with the above command.
Last edited by trusktr (2010-11-12 20:51:35)
joe@trusktr.io - joe at true skater dot io.
Offline
Yeah, indeed the -Si command shows all packages that require qt. I was looking just for the ones on my system. In this case -Qi did the trick, and i was able to extract them with the above command.
So you don't really want something like http://archlinux.org/packages/extra/i686/qt/. Oh well, glad you found what you need.
Offline
Well either way in each scenerio you can isolate just the packages:
For system-installed packages:
pacman -Qi qt | grep "Req" | sed -e 's/Required By : //g'
And for all repo packages:
pacman -Sii qt | grep "Req" | sed -e 's/Required By : //g'
joe@trusktr.io - joe at true skater dot io.
Offline
For posterity and all that, I'm replying to this 6 year old post.
At the time the above posts were probably the best answer, but now there exists a nice tool to directly extract data from pacman's alpm database instead of grepping and sedding stdout. The tool's called expac and in OP's case could be used like below if the qt package still existed:
$ expac -S %N qt
or if you only wanted to get local dependencies:
$ expac %N qt
Offline
Thanks for sharing, kohtogeiya, but please note that expac is extensively documented on the pacman tips and tricks wiki page already. You don't need to resurrect long-since-solved topics to update them.
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed