[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-portage-dev
Subject:    [gentoo-portage-dev] [PATCH] Implement host dependencies and targetroot USE flag
From:       Ambroz Bizjak <ambrop7 () gmail ! com>
Date:       2012-09-24 1:38:32
Message-ID: 1348450713-20768-1-git-send-email-ambrop7 () gmail ! com
[Download RAW message or body]

This patch implements host dependencies (HDEPEND) and dependencies only in affect \
when ROOT != / (targetroot USE flag).

See: https://bugs.gentoo.org/show_bug.cgi?id=317337
See: http://thread.gmane.org/gmane.linux.gentoo.devel/80315

This fuctionality is only enabled for EAPI=5-hdepend and should not affect other \
EAPIs. Changes:

1. HDEPEND dependencies. These are build-time dependencies which have to be installed \
on the build machine (host, ROOT=/).

2. DEPEND dependencies now always refer to packages in ROOT (target); destination of \
DEPEND is no longer determined by --root-deps.

3. targetroot USE flag. This is a special USE flag which is automatically enabled \
when the ROOT for a package is different than /. The primary use case for this is to \
make a package depend on itself in order to cross-compile. The dependency needs to be \
conditional otherwise the package may not be installable for ROOT=/.

The flag still needs to be added to IUSE to work. Example:

EAPI=5-hdepend
IUSE="... targetroot ..."
HDEPEND="....
         targetroot? ( ~${CATEGORY}/${P} )"

Also, the flag is implemented such that it is not considered by --newuse, which makes \
sure that emerge from within the target system will not attempt to rebuild every \
cross-compiled package.

I've tested this patch with packages in my cross-compile overlay which contains some \
packages using the new support: http://code.google.com/p/ambro-cross-overlay/


 bin/ebuild.sh                        | 30 +++++++++++++++-----
 pym/_emerge/depgraph.py              | 55 +++++++++++++++++++++---------------
 pym/_emerge/main.py                  |  1 -
 pym/portage/__init__.py              |  4 +--
 pym/portage/dbapi/bintree.py         |  6 ++--
 pym/portage/dbapi/porttree.py        |  2 +-
 pym/portage/dbapi/vartree.py         |  1 +
 pym/portage/eapi.py                  |  3 +-
 pym/portage/package/ebuild/config.py | 11 +++++++-
 9 files changed, 76 insertions(+), 37 deletions(-)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic