Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 324142 Details for
Bug 317337
[Future EAPI]: BDEPEND (DEPEND) for classifying build time dependencies as CBUILD or CHOST ones + SYSROOT for CHOST deps
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
HDEPEND for Portage 2.1.11.17
portage-2.1.11.17-hdepend-4.patch (text/plain), 14.27 KB, created by
Ambroz Bizjak
on 2012-09-18 02:34:54 UTC
(
hide
)
Description:
HDEPEND for Portage 2.1.11.17
Filename:
MIME Type:
Creator:
Ambroz Bizjak
Created:
2012-09-18 02:34:54 UTC
Size:
14.27 KB
patch
obsolete
>diff -urN portage-2.1.11.17/bin/ebuild.sh portage-2.1.11.17.new/bin/ebuild.sh >--- portage-2.1.11.17/bin/ebuild.sh 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/bin/ebuild.sh 2012-09-16 21:09:59.534267702 +0200 >@@ -221,6 +221,8 @@ > local B_DEPEND > local B_RDEPEND > local B_PDEPEND >+ local B_HDEPEND >+ local B_CROSS_HDEPEND > while [ "$1" ]; do > location="${ECLASSDIR}/${1}.eclass" > olocation="" >@@ -263,20 +265,22 @@ > EBUILD_OVERLAY_ECLASSES="${EBUILD_OVERLAY_ECLASSES} ${location}" > fi > >- #We need to back up the value of DEPEND and RDEPEND to B_DEPEND and B_RDEPEND >+ #We need to back up the values of *DEPEND to B_*DEPEND > #(if set).. and then restore them after the inherit call. > > #turn off glob expansion > set -f > > # Retain the old data and restore it later. >- unset B_IUSE B_REQUIRED_USE B_DEPEND B_RDEPEND B_PDEPEND >+ unset B_IUSE B_REQUIRED_USE B_DEPEND B_RDEPEND B_PDEPEND B_HDEPEND B_CROSS_HDEPEND > [ "${IUSE+set}" = set ] && B_IUSE="${IUSE}" > [ "${REQUIRED_USE+set}" = set ] && B_REQUIRED_USE="${REQUIRED_USE}" > [ "${DEPEND+set}" = set ] && B_DEPEND="${DEPEND}" > [ "${RDEPEND+set}" = set ] && B_RDEPEND="${RDEPEND}" > [ "${PDEPEND+set}" = set ] && B_PDEPEND="${PDEPEND}" >- unset IUSE REQUIRED_USE DEPEND RDEPEND PDEPEND >+ [ "${HDEPEND+set}" = set ] && B_HDEPEND="${HDEPEND}" >+ [ "${CROSS_HDEPEND+set}" = set ] && B_CROSS_HDEPEND="${CROSS_HDEPEND}" >+ unset IUSE REQUIRED_USE DEPEND RDEPEND PDEPEND HDEPEND CROSS_HDEPEND > #turn on glob expansion > set +f > >@@ -292,6 +296,8 @@ > [ "${DEPEND+set}" = set ] && E_DEPEND+="${E_DEPEND:+ }${DEPEND}" > [ "${RDEPEND+set}" = set ] && E_RDEPEND+="${E_RDEPEND:+ }${RDEPEND}" > [ "${PDEPEND+set}" = set ] && E_PDEPEND+="${E_PDEPEND:+ }${PDEPEND}" >+ [ "${HDEPEND+set}" = set ] && E_HDEPEND+="${E_HDEPEND:+ }${HDEPEND}" >+ [ "${CROSS_HDEPEND+set}" = set ] && E_CROSS_HDEPEND+="${E_CROSS_HDEPEND:+ }${CROSS_HDEPEND}" > > [ "${B_IUSE+set}" = set ] && IUSE="${B_IUSE}" > [ "${B_IUSE+set}" = set ] || unset IUSE >@@ -308,6 +314,12 @@ > [ "${B_PDEPEND+set}" = set ] && PDEPEND="${B_PDEPEND}" > [ "${B_PDEPEND+set}" = set ] || unset PDEPEND > >+ [ "${B_HDEPEND+set}" = set ] && HDEPEND="${B_HDEPEND}" >+ [ "${B_HDEPEND+set}" = set ] || unset HDEPEND >+ >+ [ "${B_CROSS_HDEPEND+set}" = set ] && CROSS_HDEPEND="${B_CROSS_HDEPEND}" >+ [ "${B_CROSS_HDEPEND+set}" = set ] || unset CROSS_HDEPEND >+ > #turn on glob expansion > set +f > >@@ -534,8 +546,9 @@ > # In order to ensure correct interaction between ebuilds and > # eclasses, they need to be unset before this process of > # interaction begins. >- unset EAPI DEPEND RDEPEND PDEPEND INHERITED IUSE REQUIRED_USE \ >- ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND >+ unset EAPI DEPEND RDEPEND PDEPEND HDEPEND CROSS_HDEPEND INHERITED IUSE REQUIRED_USE \ >+ ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND \ >+ E_HDEPEND E_CROSS_HDEPEND > > if [[ $PORTAGE_DEBUG != 1 || ${-/x/} != $- ]] ; then > source "$EBUILD" || die "error sourcing ebuild" >@@ -566,10 +579,12 @@ > DEPEND+="${DEPEND:+ }${E_DEPEND}" > RDEPEND+="${RDEPEND:+ }${E_RDEPEND}" > PDEPEND+="${PDEPEND:+ }${E_PDEPEND}" >+ HDEPEND+="${HDEPEND:+ }${E_HDEPEND}" >+ CROSS_HDEPEND+="${CROSS_HDEPEND:+ }${E_CROSS_HDEPEND}" > REQUIRED_USE+="${REQUIRED_USE:+ }${E_REQUIRED_USE}" > >- unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND \ >- __INHERITED_QA_CACHE >+ unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND E_HDEPEND \ >+ E_CROSS_HDEPEND __INHERITED_QA_CACHE > > # alphabetically ordered by $EBUILD_PHASE value > case "$EAPI" in >@@ -670,9 +685,16 @@ > > auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE > DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND PROVIDE EAPI >- PROPERTIES DEFINED_PHASES UNUSED_05 UNUSED_04 >+ PROPERTIES DEFINED_PHASES HDEPEND CROSS_HDEPEND > UNUSED_03 UNUSED_02 UNUSED_01" > >+ case "$EAPI" in >+ 0|1|2|3|4) >+ unset HDEPEND >+ unset CROSS_HDEPEND >+ ;; >+ esac >+ > # The extra $(echo) commands remove newlines. > if [ -n "${dbkey}" ] ; then > > "${dbkey}" >diff -urN portage-2.1.11.17/pym/_emerge/depgraph.py portage-2.1.11.17.new/pym/_emerge/depgraph.py >--- portage-2.1.11.17/pym/_emerge/depgraph.py 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/pym/_emerge/depgraph.py 2012-09-18 02:18:42.103562856 +0200 >@@ -503,7 +503,7 @@ > > pkg_tree_map = RootConfig.pkg_tree_map > >- _dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"] >+ _dep_keys = ["DEPEND", "RDEPEND", "PDEPEND", "HDEPEND", "CROSS_HDEPEND"] > > def __init__(self, settings, trees, myopts, myparams, spinner, > frozen_config=None, backtrack_parameters=BacktrackParameter(), allow_backtracking=False): >@@ -537,6 +537,7 @@ > "--nodeps" not in self._frozen_config.myopts > > if self._frozen_config.myopts.get("--root-deps") is not None and \ >+ self._frozen_config.myopts.get("--host-deps", "y") == "n" and \ > myroot != self._frozen_config.target_root: > continue > >@@ -1682,7 +1683,7 @@ > removal_action = "remove" in self._dynamic_config.myparams > > edepend={} >- depkeys = ["DEPEND","RDEPEND","PDEPEND"] >+ depkeys = ["DEPEND","RDEPEND","PDEPEND","HDEPEND","CROSS_HDEPEND"] > for k in depkeys: > edepend[k] = metadata[k] > >@@ -1710,31 +1711,68 @@ > # Removal actions never traverse ignored buildtime > # dependencies, so it's safe to discard them early. > edepend["DEPEND"] = "" >+ edepend["HDEPEND"] = "" >+ edepend["CROSS_HDEPEND"] = "" > ignore_build_time_deps = True > >+ ignore_depend_deps = ignore_build_time_deps >+ ignore_hdepend_deps = ignore_build_time_deps >+ >+ depend_is_host = False >+ > if removal_action: > depend_root = myroot > else: >- depend_root = self._frozen_config._running_root.root >- root_deps = self._frozen_config.myopts.get("--root-deps") >- if root_deps is not None: >- if root_deps is True: >- depend_root = myroot >- elif root_deps == "rdeps": >- ignore_build_time_deps = True >+ if pkg.metadata['EAPI'] not in ('0', '1', '2', '3', '4'): >+ # For ebuilds that have EAPI 5 or later, --root-deps >+ # has no effect, since DEPEND has been divided into two parts: >+ # DEPEND for build-time target dependencies, and HDEPEND for >+ # build-time host dependencies. >+ depend_root = myroot >+ else: >+ depend_root = self._frozen_config._running_root.root >+ depend_is_host = True >+ root_deps = self._frozen_config.myopts.get("--root-deps") >+ if root_deps is not None: >+ if root_deps is True: >+ depend_root = myroot >+ depend_is_host = False >+ elif root_deps == "rdeps": >+ ignore_depend_deps = True >+ >+ if self._frozen_config.myopts.get("--host-deps", "y") == 'n': >+ ignore_hdepend_deps = True >+ if depend_is_host: >+ ignore_depend_deps = True >+ >+ ignore_cross_hdepend_deps = ignore_hdepend_deps >+ if self._frozen_config.myopts.get("--crosscompile") not in ('True', 'y'): >+ ignore_cross_hdepend_deps = True > > # If rebuild mode is not enabled, it's safe to discard ignored > # build-time dependencies. If you want these deps to be traversed > # in "complete" mode then you need to specify --with-bdeps=y. >- if ignore_build_time_deps and \ >- not self._rebuild.rebuild: >- edepend["DEPEND"] = "" >- >+ if not self._rebuild.rebuild: >+ if ignore_depend_deps: >+ edepend["DEPEND"] = "" >+ if ignore_hdepend_deps: >+ edepend["HDEPEND"] = "" >+ if ignore_cross_hdepend_deps: >+ edepend["CROSS_HDEPEND"] = "" >+ > deps = ( > (depend_root, edepend["DEPEND"], > self._priority(buildtime=True, >- optional=(pkg.built or ignore_build_time_deps), >- ignored=ignore_build_time_deps)), >+ optional=(pkg.built or ignore_depend_deps), >+ ignored=ignore_depend_deps)), >+ (self._frozen_config._running_root.root, edepend["HDEPEND"], >+ self._priority(buildtime=True, >+ optional=(pkg.built or ignore_hdepend_deps), >+ ignored=ignore_hdepend_deps)), >+ (self._frozen_config._running_root.root, edepend["CROSS_HDEPEND"], >+ self._priority(buildtime=True, >+ optional=(pkg.built or ignore_cross_hdepend_deps), >+ ignored=ignore_cross_hdepend_deps)), > (myroot, edepend["RDEPEND"], > self._priority(runtime=True)), > (myroot, edepend["PDEPEND"], >@@ -2835,7 +2873,7 @@ > return [pkg.slot_atom for pkg in greedy_pkgs] > > blockers = {} >- blocker_dep_keys = ["DEPEND", "PDEPEND", "RDEPEND"] >+ blocker_dep_keys = ["DEPEND", "PDEPEND", "RDEPEND", "HDEPEND", "CROSS_HDEPEND"] > for pkg in greedy_pkgs + [highest_pkg]: > dep_str = " ".join(pkg.metadata[k] for k in blocker_dep_keys) > try: >@@ -3096,7 +3134,7 @@ > > if target_atom is not None and isinstance(node, Package): > affecting_use = set() >- for dep_str in "DEPEND", "RDEPEND", "PDEPEND": >+ for dep_str in "DEPEND", "RDEPEND", "PDEPEND", "HDEPEND", "CROSS_HDEPEND": > try: > affecting_use.update(extract_affecting_use( > node.metadata[dep_str], target_atom, >@@ -3180,10 +3218,14 @@ > dep_strings.add(node.metadata["DEPEND"]) > dep_strings.add(node.metadata["RDEPEND"]) > dep_strings.add(node.metadata["PDEPEND"]) >+ dep_strings.add(node.metadata["HDEPEND"]) >+ dep_strings.add(node.metadata["CROSS_HDEPEND"]) > else: > for priority in priorities: > if priority.buildtime: > dep_strings.add(node.metadata["DEPEND"]) >+ dep_strings.add(node.metadata["HDEPEND"]) >+ dep_strings.add(node.metadata["CROSS_HDEPEND"]) > if priority.runtime: > dep_strings.add(node.metadata["RDEPEND"]) > if priority.runtime_post: >@@ -4126,7 +4168,7 @@ > if pkg not in self._dynamic_config.digraph.nodes: > return False > >- for key in "DEPEND", "RDEPEND", "PDEPEND", "LICENSE": >+ for key in "DEPEND", "RDEPEND", "PDEPEND", "HDEPEND", "CROSS_HDEPEND", "LICENSE": > dep = pkg.metadata[key] > old_val = set(portage.dep.use_reduce(dep, pkg.use.enabled, is_valid_flag=pkg.iuse.is_valid_flag, flat=True)) > new_val = set(portage.dep.use_reduce(dep, new_use, is_valid_flag=pkg.iuse.is_valid_flag, flat=True)) >diff -urN portage-2.1.11.17/pym/_emerge/main.py portage-2.1.11.17.new/pym/_emerge/main.py >--- portage-2.1.11.17/pym/_emerge/main.py 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/pym/_emerge/main.py 2012-09-18 01:38:24.579623439 +0200 >@@ -489,6 +489,8 @@ > "--use-ebuild-visibility": y_or_n, > '--usepkg' : y_or_n, > '--usepkgonly' : y_or_n, >+ '--crosscompile' : y_or_n, >+ '--host-deps' : y_or_n, > } > > if _ENABLE_DYN_LINK_MAP: >@@ -975,6 +977,17 @@ > "choices" : true_y_or_n > }, > >+ "--crosscompile": { >+ "help" : "cross compile mode", >+ "type" : "choice", >+ "choices" : true_y_or_n >+ }, >+ >+ "--host-deps": { >+ "help" : "enable or disable installation of host dependencies", >+ "type" : "choice", >+ "choices" : y_or_n >+ }, > } > > if _ENABLE_DYN_LINK_MAP: >diff -urN portage-2.1.11.17/pym/portage/dbapi/bintree.py portage-2.1.11.17.new/pym/portage/dbapi/bintree.py >--- portage-2.1.11.17/pym/portage/dbapi/bintree.py 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/pym/portage/dbapi/bintree.py 2012-09-16 21:21:15.326250768 +0200 >@@ -75,6 +75,7 @@ > ["BUILD_TIME", "CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS", > "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", > "RDEPEND", "repository", "RESTRICT", "SLOT", "USE", "DEFINED_PHASES", >+ "HDEPEND", "CROSS_HDEPEND", > ]) > self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys) > self._aux_cache = {} >@@ -304,11 +305,11 @@ > ["BUILD_TIME", "CHOST", "DEPEND", "DESCRIPTION", "EAPI", > "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES", > "PROVIDE", "RDEPEND", "repository", "SLOT", "USE", "DEFINED_PHASES", >- "BASE_URI"] >+ "BASE_URI", "HDEPEND", "CROSS_HDEPEND"] > self._pkgindex_aux_keys = list(self._pkgindex_aux_keys) > self._pkgindex_use_evaluated_keys = \ > ("LICENSE", "RDEPEND", "DEPEND", >- "PDEPEND", "PROPERTIES", "PROVIDE") >+ "PDEPEND", "PROPERTIES", "PROVIDE", "HDEPEND", "CROSS_HDEPEND") > self._pkgindex_header_keys = set([ > "ACCEPT_KEYWORDS", "ACCEPT_LICENSE", > "ACCEPT_PROPERTIES", "CBUILD", >@@ -330,6 +331,8 @@ > "SLOT" : "0", > "USE" : "", > "DEFINED_PHASES" : "", >+ "HDEPEND" : "", >+ "CROSS_HDEPEND" : "", > } > self._pkgindex_inherited_keys = ["CHOST", "repository"] > >diff -urN portage-2.1.11.17/pym/portage/dbapi/porttree.py portage-2.1.11.17.new/pym/portage/dbapi/porttree.py >--- portage-2.1.11.17/pym/portage/dbapi/porttree.py 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/pym/portage/dbapi/porttree.py 2012-09-16 21:21:50.867249877 +0200 >@@ -189,7 +189,8 @@ > self._aux_cache_keys = set( > ["DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE", > "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", >- "RESTRICT", "SLOT", "DEFINED_PHASES", "REQUIRED_USE"]) >+ "RESTRICT", "SLOT", "DEFINED_PHASES", "REQUIRED_USE", "HDEPEND", >+ "CROSS_HDEPEND"]) > > self._aux_cache = {} > self._broken_ebuilds = set() >diff -urN portage-2.1.11.17/pym/portage/dbapi/vartree.py portage-2.1.11.17.new/pym/portage/dbapi/vartree.py >--- portage-2.1.11.17/pym/portage/dbapi/vartree.py 2012-09-14 04:39:24.000000000 +0200 >+++ portage-2.1.11.17.new/pym/portage/dbapi/vartree.py 2012-09-16 21:20:34.074251801 +0200 >@@ -165,6 +165,7 @@ > "EAPI", "HOMEPAGE", "IUSE", "KEYWORDS", > "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", > "repository", "RESTRICT" , "SLOT", "USE", "DEFINED_PHASES", >+ "HDEPEND", "CROSS_HDEPEND", > ]) > self._aux_cache_obj = None > self._aux_cache_filename = os.path.join(self._eroot, >diff -urN portage-2.1.11.17/pym/portage/__init__.py portage-2.1.11.17.new/pym/portage/__init__.py >--- portage-2.1.11.17/pym/portage/__init__.py 2012-09-14 04:40:15.000000000 +0200 >+++ portage-2.1.11.17.new/pym/portage/__init__.py 2012-09-16 21:20:08.176252450 +0200 >@@ -414,7 +414,7 @@ > > _doebuild_manifest_exempt_depend = 0 > >-_testing_eapis = frozenset(["4-python", "4-slot-abi", "5_pre2"]) >+_testing_eapis = frozenset(["4-python", "4-slot-abi", "4-hdepend", "5_pre2"]) > _deprecated_eapis = frozenset(["4_pre1", "3_pre2", "3_pre1", "5_pre1"]) > > def _eapi_is_deprecated(eapi): >@@ -472,7 +472,7 @@ > 'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION', > 'KEYWORDS', 'INHERITED', 'IUSE', 'REQUIRED_USE', > 'PDEPEND', 'PROVIDE', 'EAPI', >- 'PROPERTIES', 'DEFINED_PHASES', 'UNUSED_05', 'UNUSED_04', >+ 'PROPERTIES', 'DEFINED_PHASES', 'HDEPEND', 'CROSS_HDEPEND', > 'UNUSED_03', 'UNUSED_02', 'UNUSED_01', > ) > auxdbkeylen=len(auxdbkeys)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317337
:
229283
|
242403
|
242691
|
323962
|
323992
|
323994
|
324000
|
324002
|
324038
| 324142