This is a suggestion: How about adding an option to see if all the requeriments for all the ebuilds that are going to be merged are satisfied (instead of doing one per one when this ebuilds starts)? For example, librsvg needs cairo compiled with png USE flag. This will be very good for unattended compilations. An example: (with --check as the option suggested) emerge --verbose --ask --check <something that requires libsrvg> some ebuild some ebuild some ebuild libsrvg (version) (use flags) some ebuild (...) Do you want to emerge .. ? [Y/n] Y Checking... ERROR: libcairo need to be emerged with png activated! Thanks.
*** This bug has been marked as a duplicate of 2272 ***
The use case (USE flag detection) is invalid; but it's a valid idea IMHO. Akin to "Portage should validate it's ability to install" before installing. The only thing I can think of to put here right now is a space check; which is in itself a difficult proposition as files are littered about /usr and /var and /etc and these (as well as subdirs of them) may be on different file systems. Packages may depend on other libs, and other binaries; is there anything else they may require besides disk space? Licenses? CD-ROMs? I'll leave it resolved however; since I have no code to show and the idea is still rather vague.
(In reply to comment #2) > The only thing I can think of to put here right now is a space check; which is > in itself a difficult proposition as files are littered about /usr and /var and > /etc and these (as well as subdirs of them) may be on different file systems. A space checks isn't difficult, it's next to impossible without having accurate information about how big a package is actually going to be (unless you have a magic function that takes distfile size and returns a binpkg content listing). And that's just one of the problems.
In this particular case, librsvg has this code: pkg_setup() { G2CONF="--enable-gtk-theme --enable-pixbuf-loader \ --disable-mozilla-plugin --with-croco \ --disable-gnome-print \ $(use_enable gnome gnome-vfs) \ $(use_with zlib svgz)" if ! built_with_use x11-libs/cairo png; then einfo "Please re-emerge x11-libs/cairo with the png USE flag set" die "cairo needs the png flag set" fi } How about running all pkg_config of all required ebuilds and not compile them in this stage?
(In reply to comment #4) > In this particular case, librsvg has this code: > > pkg_setup() { > G2CONF="--enable-gtk-theme --enable-pixbuf-loader \ > --disable-mozilla-plugin --with-croco \ > --disable-gnome-print \ > $(use_enable gnome gnome-vfs) \ > $(use_with zlib svgz)" > > if ! built_with_use x11-libs/cairo png; then > einfo "Please re-emerge x11-libs/cairo with the png USE flag > set" > die "cairo needs the png flag set" > fi > } > > How about running all pkg_config of all required ebuilds and not compile them > in this stage? > Because that particular case is a USE dep. libsvg requires cairo[+png]. This type of dependency is planned for a future version of portage. No one will run these checks after the dep parser because they belong *IN* the dep parser itself.