LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Emerge options and optional dependencies (https://www.linuxquestions.org/questions/gentoo-87/emerge-options-and-optional-dependencies-4175435582/)

damgar 11-04-2012 11:20 AM

Emerge options and optional dependencies
 
I am generally a Slackware user so I'm used to more or less manually building and installing packages with slackbuild scripts or just using a few trusted repos for some packages like VLC or ffmpeg. I decided to try Gentoo on a new machine to see how it compares and so far it is amazingly fast, but I'm a little confused about emerge. I have built the base system and I have KDE working, and I have sound, but I have rebuilt somepackages 4 and 5 times due to lacking dependencies. A few packages like VLC and ffmpeg have a lot of optional dependencies. I was wondering if there was a command that would just bring these dependencies in and build them. I think
Code:

emerge -D ffmpeg
might accomplish this, but I'm not sure. Do I have this correct?

segmentation_fault 11-05-2012 06:02 AM

Generally you fine tune those optional dependencies with the use flags. There is a USE var in /etc/(portage/)make.conf which is for global flags, and you can set per packase flags in /etc/portage/package.use . That said, it is good, especially when you update world, to add -N (--newuse) option to emerge which will check for changes in use flags and re-emerge/update the packages affected. A typical update command is (if you haven't already read it elsewhere)
Code:

emerge -uDNv world
Hope this helps a bit.

i92guboj 11-06-2012 04:11 PM

A simple "emerge <package>" will pull all the dependencies of a given package.

If you think that some dependencies are not being pulled correctly then the fact is that that package is not a dependency. And if something that you think should be a dependency is not, then the big chance is that, more than probably, an USE flag in <package> needs to be changed. But it could also be an USE in a dependency, and not directly in <package>.

If you need to go picking random packages by hand, then you are doing something wrong, and you probably should be rather looking at the output of

Code:

emerge -pv vlc
and see what's enabled and what isn't.

vik 11-20-2012 11:50 PM

Yep, emerge <package> will pull in all dependencies you need based on your USE flags. To check if you're missing dependencies you can optionally run revdep-rebuild.

i92guboj 12-06-2012 05:26 AM

revdep-rebuild is not meant to be a dep-checker of any kind, though it obviously does some basic dep checking before doing its real work just to make sure that something trivial is not missing.

The real revdep-rebuild taks is to check if the ABI is consistent across all your packages and libraries, so that if some random package was built against any-random-lib-1.x, but you upgraded to any-random-lib-2.x, it will continue to work (by recompiling it against the new library).

Dependencies do not work that way, they are in fact checked *before* you emerge the package, much before you have the binary file that's all revdep-rebuild cares about.


All times are GMT -5. The time now is 02:48 PM.