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'd like to install a software package on my Fedora System, but it has a lot of unreasonable dependencies (which I know for sure they are not actually required).

I used to work on Debian, where apt-get allows you to systematically exclude recommended and suggested packages, installing only the strictly required dependencies.

Is there a way to do so with Yum?

share|improve this question

3 Answers 3

No.

Unfortunately, RPM-based package management has just one type of dependencies. It's a dependency or it's not, not something in between (read here). In my experience, dependencies in Fedora are quite limited and non-core functionality is not installed unless you do group-installs.

The multiple levels of dependencies shows one of the powers of DEB-based package management, in my opinion.

share|improve this answer
    
Installing eclipse on fedora is a 400MB install, I came here looking for a yum install --whithout-recommends but nothing. –  Manuel Gutierrez May 14 '13 at 15:56

Dependencies in RPM based distributions work in a different manner to the dpkg Requires/Recommends/Suggests method.

Generally dependencies in RPM based distributions can be considered as an equivalent to "this package will not work properly unless this dependency is met". However there is some artistic freedom for package maintainers to include extra dependencies as they see fit (either because they are not automatically detected, or because they feel that it is a hard requirement).

As an example, a web application in Debian/Ubuntu may have various suggests dependencies on MySQL Server packages. However, because the MySQL server is not required to be on the local web server, it is not a hard requirement, the same package under Fedora would have no dependency.

There is a problem with the RPM methodology, which is what you have identified, sometimes there are too many dependencies. A common question I've heard is "Why should this package include libraries for Bluetooth when I don't use Bluetooth?", items such as optional plugins that are included in the main application package, are generally the cause for this situation.

share|improve this answer

EDIT: To answer the original question, yes that is possible for the package managers that currently support weak dependencies. As an example, on Mageia that would equal to urpmi --no-suggests foo. For SuSe, that would be zypper in --no-recommends. Something like this has to be implemented for newer yum versions too, otherwise those soft depencies would be pretty useless.


Actually there are weak dependencies in rpm that allow for that, but unfortunately those have not been added to yum and the rpm.org version that Fedora/RHEL uses since recently (and then probably only available via rawhide currently). Check http://lists.rpm.org/pipermail/rpm-maint/2014-February/003666.html for the recent announcement and implementation details. Also see http://lists.baseurl.org/pipermail/yum-devel/2009-September/005844.html for the previous discussion. Also there's a fedora wiki page about changes in rpm-4.12 that describes this support: https://fedoraproject.org/wiki/Changes/RPM-4.12

FWIW, soft dependencies are used since several years by SuSe, see http://en.opensuse.org/Libzypp/Dependencies#Weak_dependencies and the section below that shows what their rpm branch supports. Also Mandriva/Mageia and related forks use soft dependencies (only Suggests) since quite some time.

So, to answer the initial question, upgrade to rawhide/rpm-4.12 and use one of the weak dependencies it supports now.

If you need more information on internal RPM implementation details, I'll be glad to share those.

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.