[PATCH] Clean up remnants of eapi5-hdepend, HDEPEND and targetroot

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Clean up remnants of eapi5-hdepend, HDEPEND and targetroot

Michał Górny-5
Signed-off-by: Michał Górny <[hidden email]>
---
 bin/eapi.sh                                   | 46 +++++++++----------
 bin/ebuild.sh                                 | 23 +++-------
 bin/phase-functions.sh                        |  4 +-
 doc/package/ebuild.docbook                    |  1 -
 doc/package/ebuild/eapi/5-hdepend.docbook     | 32 -------------
 doc/portage.docbook                           |  1 -
 lib/_emerge/Package.py                        |  6 +--
 lib/_emerge/actions.py                        |  1 -
 lib/_emerge/depgraph.py                       | 12 +----
 lib/portage/__init__.py                       |  2 +-
 lib/portage/cache/metadata.py                 |  2 +-
 lib/portage/dbapi/bintree.py                  |  7 ++-
 lib/portage/dbapi/porttree.py                 |  2 +-
 lib/portage/dbapi/vartree.py                  |  2 +-
 lib/portage/dep/_slot_operator.py             |  3 --
 lib/portage/eapi.py                           | 18 ++------
 .../ebuild/_config/special_env_vars.py        |  2 +-
 lib/portage/package/ebuild/config.py          | 13 +-----
 man/emerge.1                                  | 10 ++--
 repoman/cnf/repository/linechecks.yaml        |  1 -
 .../modules/linechecks/patches/patches.py     |  2 +-
 21 files changed, 53 insertions(+), 137 deletions(-)
 delete mode 100644 doc/package/ebuild/eapi/5-hdepend.docbook

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 4eafc1c87..29dfb008c 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -31,19 +31,15 @@ ___eapi_has_prefix_variables() {
 }
 
 ___eapi_has_BROOT() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_SYSROOT() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
-}
-
-___eapi_has_HDEPEND() {
- [[ ${1-${EAPI-0}} =~ ^(5-hdepend)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_BDEPEND() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_RDEPEND_DEPEND_fallback() {
@@ -65,11 +61,11 @@ ___eapi_has_dosed() {
 }
 
 ___eapi_has_einstall() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_dohtml() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_dohtml_deprecated() {
@@ -77,7 +73,7 @@ ___eapi_has_dohtml_deprecated() {
 }
 
 ___eapi_has_dolib_libopts() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_docompress() {
@@ -85,7 +81,7 @@ ___eapi_has_docompress() {
 }
 
 ___eapi_has_dostrip() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_nonfatal() {
@@ -101,23 +97,23 @@ ___eapi_has_usex() {
 }
 
 ___eapi_has_get_libdir() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_einstalldocs() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_eapply() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_eapply_user() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_in_iuse() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_has_version_functions() {
@@ -167,7 +163,7 @@ ___eapi_unpack_supports_xz() {
 }
 
 ___eapi_unpack_supports_txz() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_econf_passes_--disable-dependency-tracking() {
@@ -179,7 +175,7 @@ ___eapi_econf_passes_--disable-silent-rules() {
 }
 
 ___eapi_econf_passes_--docdir_and_--htmldir() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_econf_passes_--with-sysroot() {
@@ -207,29 +203,29 @@ ___eapi_helpers_can_die() {
 }
 
 ___eapi_unpack_is_case_sensitive() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5)$ ]]
 }
 
 ___eapi_unpack_supports_absolute_paths() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5)$ ]]
 }
 
 ___eapi_die_can_respect_nonfatal() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_domo_respects_into() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 ___eapi_has_DESTTREE_INSDESTTREE() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress|6)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
 }
 
 # OTHERS
 
 ___eapi_enables_failglob_in_global_scope() {
- [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_enables_globstar() {
@@ -237,7 +233,7 @@ ___eapi_enables_globstar() {
 }
 
 ___eapi_bash_3_2() {
- [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+ [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }
 
 ___eapi_bash_4_2() {
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 5bd727aed..cfcf6eba3 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -254,7 +254,6 @@ inherit() {
  local B_DEPEND
  local B_RDEPEND
  local B_PDEPEND
- local B_HDEPEND
  local B_BDEPEND
  while [ "$1" ]; do
  location=""
@@ -300,16 +299,14 @@ inherit() {
 
  # Retain the old data and restore it later.
  unset B_IUSE B_REQUIRED_USE B_DEPEND B_RDEPEND B_PDEPEND
- unset B_HDEPEND B_BDEPEND
+ unset B_BDEPEND
  [ "${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}"
- [ "${HDEPEND+set}"    = set ] && B_HDEPEND="${HDEPEND}"
  [ "${BDEPEND+set}"    = set ] && B_BDEPEND="${BDEPEND}"
- unset IUSE REQUIRED_USE DEPEND RDEPEND PDEPEND HDEPEND
- unset BDEPEND
+ unset IUSE REQUIRED_USE DEPEND RDEPEND PDEPEND BDEPEND
  #turn on glob expansion
  set +f
  fi
@@ -327,7 +324,6 @@ inherit() {
  [ "${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}"
  [ "${BDEPEND+set}"      = set ] && E_BDEPEND+="${E_BDEPEND:+ }${BDEPEND}"
 
  [ "${B_IUSE+set}"     = set ] && IUSE="${B_IUSE}"
@@ -345,9 +341,6 @@ inherit() {
  [ "${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_BDEPEND+set}"  = set ] && BDEPEND="${B_BDEPEND}"
  [ "${B_BDEPEND+set}"  = set ] || unset BDEPEND
 
@@ -607,9 +600,9 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
  # 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 HDEPEND BDEPEND
+ unset EAPI DEPEND RDEPEND PDEPEND BDEPEND
  unset INHERITED IUSE REQUIRED_USE ECLASS E_IUSE E_REQUIRED_USE
- unset E_DEPEND E_RDEPEND E_PDEPEND E_HDEPEND E_BDEPEND
+ unset E_DEPEND E_RDEPEND E_PDEPEND E_BDEPEND
  unset PROVIDES_EXCLUDE REQUIRES_EXCLUDE
 
  if [[ $PORTAGE_DEBUG != 1 || ${-/x/} != $- ]] ; then
@@ -645,12 +638,11 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
  DEPEND+="${DEPEND:+ }${E_DEPEND}"
  RDEPEND+="${RDEPEND:+ }${E_RDEPEND}"
  PDEPEND+="${PDEPEND:+ }${E_PDEPEND}"
- HDEPEND+="${HDEPEND:+ }${E_HDEPEND}"
  BDEPEND+="${BDEPEND:+ }${E_BDEPEND}"
  REQUIRED_USE+="${REQUIRED_USE:+ }${E_REQUIRED_USE}"
 
  unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND
- unset E_HDEPEND E_BDEPEND __INHERITED_QA_CACHE
+ unset E_BDEPEND __INHERITED_QA_CACHE
 
  # alphabetically ordered by $EBUILD_PHASE value
  case ${EAPI} in
@@ -720,12 +712,9 @@ if [[ $EBUILD_PHASE = depend ]] ; then
 
  auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
  DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND BDEPEND
- EAPI PROPERTIES DEFINED_PHASES HDEPEND UNUSED_04
+ EAPI PROPERTIES DEFINED_PHASES UNUSED_05 UNUSED_04
  UNUSED_03 UNUSED_02 UNUSED_01"
 
- if ! ___eapi_has_HDEPEND; then
- unset HDEPEND
- fi
  if ! ___eapi_has_BDEPEND; then
  unset BDEPEND
  fi
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 73f8cee9b..709fd7527 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -8,7 +8,7 @@
 # when portage is upgrading itself.
 
 PORTAGE_READONLY_METADATA="BDEPEND DEFINED_PHASES DEPEND DESCRIPTION
- EAPI HDEPEND HOMEPAGE INHERITED IUSE REQUIRED_USE KEYWORDS LICENSE
+ EAPI HOMEPAGE INHERITED IUSE REQUIRED_USE KEYWORDS LICENSE
  PDEPEND RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
 
 PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \
@@ -915,7 +915,7 @@ __ebuild_phase_funcs() {
  fi
 
  # defaults starting with EAPI 6
- if ! has ${eapi} 2 3 4 4-python 4-slot-abi 5 5-progress 5-hdepend; then
+ if ! has ${eapi} 2 3 4 4-python 4-slot-abi 5 5-progress; then
  [[ ${phase_func} == src_prepare ]] && \
  default_src_prepare() { __eapi6_src_prepare; }
  [[ ${phase_func} == src_install ]] && \
diff --git a/doc/package/ebuild.docbook b/doc/package/ebuild.docbook
index c3b6caca3..98084c8fa 100644
--- a/doc/package/ebuild.docbook
+++ b/doc/package/ebuild.docbook
@@ -13,6 +13,5 @@
 &package_ebuild_eapi_4_slot_abi;
 &package_ebuild_eapi_5;
 &package_ebuild_eapi_5_progress;
-&package_ebuild_eapi_5_hdepend;
 </section>
 </chapter>
diff --git a/doc/package/ebuild/eapi/5-hdepend.docbook b/doc/package/ebuild/eapi/5-hdepend.docbook
deleted file mode 100644
index 0f568bcdd..000000000
--- a/doc/package/ebuild/eapi/5-hdepend.docbook
+++ /dev/null
@@ -1,32 +0,0 @@
-<section id='package-ebuild-eapi-5-hdepend'>
-<title>EAPI 5-hdepend</title>
-<section id='package-ebuild-eapi-5-hdepend-metadata'>
-<title>Metadata</title>
-<section id='package-ebuild-eapi-5-hdepend-metadata-dependencies'>
-<title>Dependencies</title>
-<section id='package-ebuild-eapi-5-hdepend-metadata-dependencies-hdepend'>
-<title>HDEPEND</title>
-<para>
-The HDEPEND variable is used to represent build-time host dependencies. For
-build-time target dependencies, use DEPEND (if the host is the target then both
-HDEPEND and DEPEND will be installed on it). For EAPIs that support HDEPEND,
-the emerge --root-deps option will have no effect, since it is not needed
-when build-time dependencies are correctly specified with HDEPEND and DEPEND.
-If ebuilds using EAPIs which <emphasis>do not</emphasis> support HDEPEND are
-built in the same emerge run as those using EAPIs which <emphasis>do</emphasis>
-support HDEPEND, the emerge --root-deps option will only apply to the former.
-</para>
-</section>
-<section id='package-ebuild-eapi-5-hdepend-metadata-dependencies-targetroot'>
-<title>Special "targetroot" USE flag</title>
-<para>
-The special "targetroot" USE flag will be automatically enabled for packages
-that are built for installation into a target ROOT, and will otherwise be
-automatically disabled. This flag may be used to control conditional
-dependencies, and ebuilds that use this flag need to add it to IUSE unless it
-happens to be included in the profile's IUSE_IMPLICIT variable.
-</para>
-</section>
-</section>
-</section>
-</section>
diff --git a/doc/portage.docbook b/doc/portage.docbook
index 811544f5e..04db26303 100644
--- a/doc/portage.docbook
+++ b/doc/portage.docbook
@@ -24,7 +24,6 @@
  <!ENTITY package_ebuild_eapi_4_slot_abi SYSTEM "package/ebuild/eapi/4-slot-abi.docbook">
  <!ENTITY package_ebuild_eapi_5 SYSTEM "package/ebuild/eapi/5.docbook">
  <!ENTITY package_ebuild_eapi_5_progress SYSTEM "package/ebuild/eapi/5-progress.docbook">
- <!ENTITY package_ebuild_eapi_5_hdepend SYSTEM "package/ebuild/eapi/5-hdepend.docbook">
  <!ENTITY qa SYSTEM "qa.docbook">
  <!ENTITY config SYSTEM "config.docbook">
  <!ENTITY config_bashrc SYSTEM "config/bashrc.docbook">
diff --git a/lib/_emerge/Package.py b/lib/_emerge/Package.py
index 5f34f3d27..3d7df2437 100644
--- a/lib/_emerge/Package.py
+++ b/lib/_emerge/Package.py
@@ -44,14 +44,14 @@ class Package(Task):
  metadata_keys = [
  "BDEPEND",
  "BUILD_ID", "BUILD_TIME", "CHOST", "COUNTER", "DEFINED_PHASES",
- "DEPEND", "EAPI", "HDEPEND", "INHERITED", "IUSE", "KEYWORDS",
+ "DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS",
  "LICENSE", "MD5", "PDEPEND", "PROVIDES",
  "RDEPEND", "repository", "REQUIRED_USE",
  "PROPERTIES", "REQUIRES", "RESTRICT", "SIZE",
  "SLOT", "USE", "_mtime_"]
 
- _dep_keys = ('BDEPEND', 'DEPEND', 'HDEPEND', 'PDEPEND', 'RDEPEND')
- _buildtime_keys = ('BDEPEND', 'DEPEND', 'HDEPEND')
+ _dep_keys = ('BDEPEND', 'DEPEND', 'PDEPEND', 'RDEPEND')
+ _buildtime_keys = ('BDEPEND', 'DEPEND')
  _runtime_keys = ('PDEPEND', 'RDEPEND')
  _use_conditional_misc_keys = ('LICENSE', 'PROPERTIES', 'RESTRICT')
  UNKNOWN_REPO = _unknown_repo
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 6f815bff2..31252af16 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -1362,7 +1362,6 @@ def calc_depclean(settings, trees, ldpath_mtimes,
  "RDEPEND": runtime,
  "PDEPEND": runtime_post,
  "BDEPEND": buildtime,
- "HDEPEND": buildtime,
  "DEPEND": buildtime,
  }
 
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index dcef06f93..ed7aeccad 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -3356,19 +3356,15 @@ class depgraph(object):
  # dependencies, so it's safe to discard them early.
  edepend["DEPEND"] = ""
  edepend["BDEPEND"] = ""
- edepend["HDEPEND"] = ""
  ignore_build_time_deps = True
 
  ignore_depend_deps = ignore_build_time_deps
  ignore_bdepend_deps = ignore_build_time_deps
- ignore_hdepend_deps = ignore_build_time_deps
 
  if removal_action:
  depend_root = myroot
  else:
- if eapi_attrs.hdepend:
- depend_root = myroot
- elif eapi_attrs.bdepend:
+ if eapi_attrs.bdepend:
  depend_root = pkg.root_config.settings["ESYSROOT"]
  else:
  depend_root = self._frozen_config._running_root.root
@@ -3387,8 +3383,6 @@ class depgraph(object):
  edepend["DEPEND"] = ""
  if ignore_bdepend_deps:
  edepend["BDEPEND"] = ""
- if ignore_hdepend_deps:
- edepend["HDEPEND"] = ""
 
  # Since build-time deps tend to be a superset of run-time deps, order
  # dep processing such that build-time deps are popped from
@@ -3403,10 +3397,6 @@ class depgraph(object):
  self._priority(buildtime=True,
  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["BDEPEND"],
  self._priority(buildtime=True,
  optional=(pkg.built or ignore_bdepend_deps),
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 71cbdad2e..e11abce0c 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -518,7 +518,7 @@ auxdbkeys = (
  'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
  'KEYWORDS',  'INHERITED', 'IUSE', 'REQUIRED_USE',
  'PDEPEND',   'BDEPEND', 'EAPI',
- 'PROPERTIES', 'DEFINED_PHASES', 'HDEPEND', 'UNUSED_04',
+ 'PROPERTIES', 'DEFINED_PHASES', 'UNUSED_05', 'UNUSED_04',
  'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
 )
 auxdbkeylen = len(auxdbkeys)
diff --git a/lib/portage/cache/metadata.py b/lib/portage/cache/metadata.py
index 59b25b606..45a057d08 100644
--- a/lib/portage/cache/metadata.py
+++ b/lib/portage/cache/metadata.py
@@ -30,7 +30,7 @@ class database(flat_hash.database):
  'RESTRICT',  'HOMEPAGE',  'LICENSE', 'DESCRIPTION',
  'KEYWORDS',  'INHERITED', 'IUSE', 'REQUIRED_USE',
  'PDEPEND',   'BDEPEND',   'EAPI', 'PROPERTIES',
- 'DEFINED_PHASES', 'HDEPEND')
+ 'DEFINED_PHASES')
 
  autocommits = True
  serialize_eclasses = False
diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py
index 9d3ea039b..311c9a78a 100644
--- a/lib/portage/dbapi/bintree.py
+++ b/lib/portage/dbapi/bintree.py
@@ -94,7 +94,7 @@ class bindbapi(fakedbapi):
  # Selectively cache metadata in order to optimize dep matching.
  self._aux_cache_keys = set(
  ["BDEPEND", "BUILD_ID", "BUILD_TIME", "CHOST", "DEFINED_PHASES",
- "DEPEND", "EAPI", "HDEPEND", "IUSE", "KEYWORDS",
+ "DEPEND", "EAPI", "IUSE", "KEYWORDS",
  "LICENSE", "MD5", "PDEPEND", "PROPERTIES",
  "PROVIDES", "RDEPEND", "repository", "REQUIRES", "RESTRICT",
  "SIZE", "SLOT", "USE", "_mtime_"
@@ -394,13 +394,13 @@ class binarytree(object):
  self._pkgindex_aux_keys = \
  ["BASE_URI", "BDEPEND", "BUILD_ID", "BUILD_TIME", "CHOST",
  "DEFINED_PHASES", "DEPEND", "DESCRIPTION", "EAPI",
- "HDEPEND", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND",
+ "IUSE", "KEYWORDS", "LICENSE", "PDEPEND",
  "PKGINDEX_URI", "PROPERTIES", "PROVIDES",
  "RDEPEND", "repository", "REQUIRES", "RESTRICT",
  "SIZE", "SLOT", "USE"]
  self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
  self._pkgindex_use_evaluated_keys = \
- ("BDEPEND", "DEPEND", "HDEPEND", "LICENSE", "RDEPEND",
+ ("BDEPEND", "DEPEND", "LICENSE", "RDEPEND",
  "PDEPEND", "PROPERTIES", "RESTRICT")
  self._pkgindex_header = None
  self._pkgindex_header_keys = set([
@@ -417,7 +417,6 @@ class binarytree(object):
  "DEFINED_PHASES"     : "",
  "DEPEND"  : "",
  "EAPI"    : "0",
- "HDEPEND" : "",
  "IUSE"    : "",
  "KEYWORDS": "",
  "LICENSE" : "",
diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py
index e4b688b9a..4bb396a6c 100644
--- a/lib/portage/dbapi/porttree.py
+++ b/lib/portage/dbapi/porttree.py
@@ -315,7 +315,7 @@ class portdbapi(dbapi):
  self._pregen_auxdb[x] = cache
  # Selectively cache metadata in order to optimize dep matching.
  self._aux_cache_keys = set(
- ["BDEPEND", "DEPEND", "EAPI", "HDEPEND",
+ ["BDEPEND", "DEPEND", "EAPI",
  "INHERITED", "IUSE", "KEYWORDS", "LICENSE",
  "PDEPEND", "PROPERTIES", "RDEPEND", "repository",
  "RESTRICT", "SLOT", "DEFINED_PHASES", "REQUIRED_USE"])
diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py
index 039e520d5..29843656f 100644
--- a/lib/portage/dbapi/vartree.py
+++ b/lib/portage/dbapi/vartree.py
@@ -187,7 +187,7 @@ class vardbapi(dbapi):
  self.vartree = vartree
  self._aux_cache_keys = set(
  ["BDEPEND", "BUILD_TIME", "CHOST", "COUNTER", "DEPEND",
- "DESCRIPTION", "EAPI", "HDEPEND", "HOMEPAGE",
+ "DESCRIPTION", "EAPI", "HOMEPAGE",
  "BUILD_ID", "IUSE", "KEYWORDS",
  "LICENSE", "PDEPEND", "PROPERTIES", "RDEPEND",
  "repository", "RESTRICT" , "SLOT", "USE", "DEFINED_PHASES",
diff --git a/lib/portage/dep/_slot_operator.py b/lib/portage/dep/_slot_operator.py
index bae94b30a..a9f74382c 100644
--- a/lib/portage/dep/_slot_operator.py
+++ b/lib/portage/dep/_slot_operator.py
@@ -68,9 +68,6 @@ def evaluate_slot_operator_equal_deps(settings, use, trees):
  if eapi_attrs.bdepend:
  _eval_deps(deps["BDEPEND"], [running_vardb])
  _eval_deps(deps["DEPEND"], [target_vardb])
- elif eapi_attrs.hdepend:
- _eval_deps(deps["HDEPEND"], [running_vardb])
- _eval_deps(deps["DEPEND"], [target_vardb])
  else:
  if running_vardb is not target_vardb:
  vardbs.append(running_vardb)
diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py
index 5e12e976d..aca571ebd 100644
--- a/lib/portage/eapi.py
+++ b/lib/portage/eapi.py
@@ -78,7 +78,7 @@ def eapi_has_use_dep_defaults(eapi):
 
 def eapi_requires_posixish_locale(eapi):
  return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
- "5", "5-progress", "5-hdepend")
+ "5", "5-progress")
 
 def eapi_has_repo_deps(eapi):
  return eapi in ("4-python", "5-progress")
@@ -101,9 +101,6 @@ def eapi_has_use_aliases(eapi):
 def eapi_has_automatic_unpack_dependencies(eapi):
  return eapi in ("5-progress",)
 
-def eapi_has_hdepend(eapi):
- return eapi in ("5-hdepend",)
-
 def eapi_allows_package_provided(eapi):
  return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
  "5", "5-progress", "6")
@@ -112,9 +109,6 @@ def eapi_has_bdepend(eapi):
  return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
  "5", "5-progress", "6")
 
-def eapi_has_targetroot(eapi):
- return eapi in ("5-hdepend",)
-
 def eapi_empty_groups_always_true(eapi):
  return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
  "5", "5-progress", "6")
@@ -125,18 +119,18 @@ def eapi_path_variables_end_with_trailing_slash(eapi):
 
 def eapi_has_broot(eapi):
  return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
- "5", "5-progress", "5-hdepend", "6")
+ "5", "5-progress", "6")
 
 def eapi_has_sysroot(eapi):
  return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
- "5", "5-progress", "5-hdepend", "6")
+ "5", "5-progress", "6")
 
 _eapi_attrs = collections.namedtuple('_eapi_attrs',
  'allows_package_provided '
  'bdepend broot dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
  'exports_PORTDIR exports_ECLASSDIR '
- 'feature_flag_test feature_flag_targetroot '
- 'hdepend iuse_defaults iuse_effective posixish_locale '
+ 'feature_flag_test '
+ 'iuse_defaults iuse_effective posixish_locale '
  'path_variables_end_with_trailing_slash '
  'repo_deps required_use required_use_at_most_one_of slot_operator slot_deps '
  'src_uri_arrows strong_blocks use_deps use_dep_defaults '
@@ -171,8 +165,6 @@ def _get_eapi_attrs(eapi):
  exports_PORTDIR = (eapi is None or eapi_exports_PORTDIR(eapi)),
  exports_ECLASSDIR = (eapi is not None and eapi_exports_ECLASSDIR(eapi)),
  feature_flag_test = False,
- feature_flag_targetroot = (eapi is not None and eapi_has_targetroot(eapi)),
- hdepend = (eapi is not None and eapi_has_hdepend(eapi)),
  iuse_defaults = (eapi is None or eapi_has_iuse_defaults(eapi)),
  iuse_effective = (eapi is not None and eapi_has_iuse_effective(eapi)),
  path_variables_end_with_trailing_slash = (eapi is not None and
diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py
index 50e7a9604..5e7ca6d47 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -19,7 +19,7 @@ env_blacklist = frozenset((
  "EBUILD_FORCE_TEST", "EBUILD_PHASE",
  "EBUILD_PHASE_FUNC", "EBUILD_SKIP_MANIFEST",
  "ED", "EMERGE_FROM", "EPREFIX", "EROOT",
- "GREP_OPTIONS", "HDEPEND", "HOMEPAGE",
+ "GREP_OPTIONS", "HOMEPAGE",
  "INHERITED", "IUSE", "IUSE_EFFECTIVE",
  "KEYWORDS", "LICENSE", "MERGE_TYPE",
  "PDEPEND", "PF", "PKGUSE", "PORTAGE_BACKGROUND",
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index 6efb5ae86..47c180c12 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -75,7 +75,7 @@ if sys.hexversion >= 0x3000000:
 _feature_flags_cache = {}
 
 def _get_feature_flags(eapi_attrs):
- cache_key = (eapi_attrs.feature_flag_test, eapi_attrs.feature_flag_targetroot)
+ cache_key = (eapi_attrs.feature_flag_test,)
  flags = _feature_flags_cache.get(cache_key)
  if flags is not None:
  return flags
@@ -83,8 +83,6 @@ def _get_feature_flags(eapi_attrs):
  flags = []
  if eapi_attrs.feature_flag_test:
  flags.append("test")
- if eapi_attrs.feature_flag_targetroot:
- flags.append("targetroot")
 
  flags = frozenset(flags)
  _feature_flags_cache[cache_key] = flags
@@ -160,7 +158,7 @@ class config(object):
  'PORTAGE_LOGDIR_CLEAN': 'PORT_LOGDIR_CLEAN',
  'SIGNED_OFF_BY': 'DCO_SIGNED_OFF_BY'}
 
- _setcpv_aux_keys = ('BDEPEND', 'DEFINED_PHASES', 'DEPEND', 'EAPI', 'HDEPEND',
+ _setcpv_aux_keys = ('BDEPEND', 'DEFINED_PHASES', 'DEPEND', 'EAPI',
  'INHERITED', 'IUSE', 'REQUIRED_USE', 'KEYWORDS', 'LICENSE', 'PDEPEND',
  'PROPERTIES', 'RDEPEND', 'SLOT',
  'repository', 'RESTRICT', 'LICENSE',)
@@ -1804,13 +1802,6 @@ class config(object):
  self["FEATURES"] = " ".join(x for x in self.features \
  if x != "test")
 
- if eapi_attrs.feature_flag_targetroot and \
- ("targetroot" in explicit_iuse or iuse_implicit_match("targetroot")):
- if self["ROOT"] != "/":
- use.add("targetroot")
- else:
- use.discard("targetroot")
-
  # Allow _* flags from USE_EXPAND wildcards to pass through here.
  use.difference_update([x for x in use \
  if (x not in explicit_iuse and \
diff --git a/man/emerge.1 b/man/emerge.1
index df06c54c2..4ce0dbebc 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -963,12 +963,10 @@ of packages for \fBROOT\fR.
 This option is only meaningful when used together with \fBROOT\fR and it should
 not be enabled under normal circumstances!
 
-Does not affect EAPIs that support \fBBDEPEND\fR or \fBHDEPEND\fR.
-\fBEAPI 7\fR introduces \fBBDEPEND\fR and experimental
-\fBEAPI 5-hdepend\fR features \fBHDEPEND\fR as a means to adjust
-installation into / and \fBROOT\fR.  Use the \fBSYSROOT\fR environment
-variable to control where \fBDEPEND\fR is installed to under
-\fBEAPI 7\fR.
+Does not affect EAPIs that support \fBBDEPEND\fR.  \fBEAPI 7\fR introduces
+\fBBDEPEND\fR as a means to adjust installation into / and \fBROOT\fR.  Use
+the \fBSYSROOT\fR environment variable to control where \fBDEPEND\fR
+is installed to under \fBEAPI 7\fR.
 
 When ebuilds with different EAPIs feature in the same emerge run, the
 appropriate behaviour for each EAPI is applied independently to each
diff --git a/repoman/cnf/repository/linechecks.yaml b/repoman/cnf/repository/linechecks.yaml
index bad7df93d..c323ac1f0 100644
--- a/repoman/cnf/repository/linechecks.yaml
+++ b/repoman/cnf/repository/linechecks.yaml
@@ -248,5 +248,4 @@ in_iuse_supported_eapis:
     - "4-python"
     - "4-slot-abi"
     - "5"
-    - "5-hdepend"
     - "5-progress"
diff --git a/repoman/lib/repoman/modules/linechecks/patches/patches.py b/repoman/lib/repoman/modules/linechecks/patches/patches.py
index 63651cd7c..b360805db 100644
--- a/repoman/lib/repoman/modules/linechecks/patches/patches.py
+++ b/repoman/lib/repoman/modules/linechecks/patches/patches.py
@@ -13,4 +13,4 @@ class EbuildPatches(LineCheck):
 
  def check_eapi(self, eapi):
  return eapi in ("0", "1", "2", "3", "4", "4-python",
- "4-slot-abi", "5", "5-hdepend", "5-progress")
+ "4-slot-abi", "5", "5-progress")
--
2.24.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up remnants of eapi5-hdepend, HDEPEND and targetroot

James Le Cuirot
I wanted to do this in the first place but someone, I forget who, said
it needs to stay. :/

--
James Le Cuirot (chewi)
Gentoo Linux Developer

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up remnants of eapi5-hdepend, HDEPEND and targetroot

Zac Medico-2
On 12/26/19 2:59 AM, James Le Cuirot wrote:
> I wanted to do this in the first place but someone, I forget who, said
> it needs to stay. :/

It was probably me. Now that BDEPEND is well established, we can safely
forget about HDEPEND.
--
Thanks,
Zac


signature.asc (1000 bytes) Download Attachment