zypper equivalent for apt-cache rdepends

The Pacman Rosetta says that the equivalent of apt-cache rdepends for zypper is “WORK IN PROGRESS”. I’d like to know whether this has been implemented and if so what command to use. Thank you!

On Mon, 08 Dec 2014 11:56:01 +0000, jamadagni wrote:

> The ‘Pacman Rosetta’
> (https://wiki.archlinux.org/index.php/Pacman_Rosetta) says that the
> equivalent of apt-cache rdepends for zypper is “WORK IN PROGRESS”. I’d
> like to know whether this has been implemented and if so what command to
> use. Thank you!

Have no idea what the apt-cache command does - can you clarify by stating
what you’re trying to do?

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Hi – I did refer to the Pacman Rosetta page which nicely explains that apt-cache rdepends is used to “Display packages which require X to be installed, aka show reverse/ dependencies.”

Zypper does not do reverse dependencies yet, not really a very high priority issue if you ask me.

On Tue, 09 Dec 2014 11:56:01 +0000, jamadagni wrote:

> Hi – I did refer to the Pacman Rosetta page which nicely explains that
> apt-cache rdepends is used to “Display packages which require X to be
> installed, aka show reverse/ dependencies.”

Yes, the page describes it, but I asked what your goal is. I find a lot
of times, people get focused on a way of doing things and overlook
something that might accomplish the goal in a different way.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Yes that’s wise of you but in this case it’s just what it says – I want to know which all packages depend on a particular package. With installed package, I could just do a dry-run of trying to uninstall it, but it would pull out all the reverse dependencies, in the sense if A depends on B depends on C, then uninstalling C would remove A and B as well whereas B is what I want to know i.e. the packages which directly depend on C.

On Wed, 10 Dec 2014 11:46:01 +0000, jamadagni wrote:

> hendersj;2681823 Wrote:
>> On Tue, 09 Dec 2014 11:56:01 +0000, jamadagni wrote:
>>
>> > Hi – I did refer to the Pacman Rosetta page which nicely explains
>> that
>> > apt-cache rdepends is used to “Display packages which require X to
>> be
>> > installed, aka show reverse/ dependencies.”
>>
>> Yes, the page describes it, but I asked what your goal is. I find a
>> lot of times, people get focused on a way of doing things and overlook
>> something that might accomplish the goal in a different way.
>>
>>
> Yes that’s wise of you but in this case it’s just what it says – I want
> to know which all packages depend on a particular package. With
> installed package, I could just do a dry-run of trying to uninstall it,
> but it would pull out all the reverse dependencies, in the sense if A
> depends on B depends on C, then uninstalling C would remove A and B as
> well whereas B is what I want to know i.e. the packages which directly
> depend on C.

I found this - might be of use:

https://stackoverflow.com/questions/12183757/reverse-dependency-
generation-with-zypper

For installed packages, you can use rpm with the “–whatrequires”
parameter:


[jhenderson@artifactovol ~]$ rpm -q --whatrequires lsb
google-chrome-stable-39.0.2171.71-1.x86_64

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

I know the thread is old, but just in case anyone is looking for the same question and arrives here.

I think what you were looking for is:

zypper se --requires packagename

You can also restrict the search just to installed packages instead of all packages available in repositories with:

zypper se -i --requires packagename

For example, to look for installed packages requiring python-qt4:


> zypper se -i --requires python-qt4
Loading repository data...
Reading installed packages...

S | Name        | Summary                                      | Type   
--+-------------+----------------------------------------------+--------
i | hplip       | HP's Printing, Scanning, and Faxing Software | package
i | python-kde4 | Python bindings for KDE 4                    | package