You are not logged in.
What I am trying to accomplish is when pacman tells me I have an upgradable package, I want to list the other packages on my system that depend on that one before I upgrade.
I've spent hours going over the pacman and grep man pages and the best I have come up with so far is:
pacman -Qi | grep -6 Depends | grep -6 $upgradeablepkg For example, right now pacman says package dbus-glib has a new version available. Before I upgrade, I would like to see a list of packages that may be effected before proceeding. That really ugly line up there gives me 6 lines on either side of dbus-glib which inludes the package name line, then I get to scoll through it forever deciphering which packages are effected. There has to be a better way, I just can't seem to figure it out myself, so I'm pleading for a little help from those more knowledgable than me. All I really want for output is the name of the effected packages.
Thanks
Offline
Do you only want to see the packages which depend on the upgradable one? You can get them with this command:
pacman -Qi $upgradeablepkg | grep ^RequiredOffline
thanks everyone, they both work, but I think I'll stick with the one from ber_t just because I don't want to forget the "--print" in the first one! I was approaching it backwards, never even looked at the Required line in pacman -Qi! Thanks
Offline
but I think I'll stick with the one from ber_t just because I don't want to forget the "--print" in the first one!
just an fyi, even if you forget --print, pacman will ask for confirmation.
//github/
Offline
If anyone cares, I stuck it in a function in .bashrc, works great!
Thanks again for the help.
function whatdeps() { pacman -Qi "$1" | grep ^Required;}Offline