Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152930 - add an option to test any requirements of all ebuild that are going to be emerged
Summary: add an option to test any requirements of all ebuild that are going to be eme...
Status: RESOLVED DUPLICATE of bug 2272
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-26 15:45 UTC by David Carlos Manuelda
Modified: 2006-10-27 18:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2006-10-26 15:45:56 UTC
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.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2006-10-26 15:47:14 UTC

*** This bug has been marked as a duplicate of 2272 ***
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-10-27 06:00:05 UTC
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.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2006-10-27 07:22:51 UTC
(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.
Comment 4 David Carlos Manuelda 2006-10-27 17:25:23 UTC
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?
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-10-27 18:01:15 UTC
(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.