Suggested-by: Zac Medico <zmed...@gentoo.org> Acked-by: Michael Everitt <m.j.ever...@iee.org> Bug: https://bugs.gentoo.org/668538 --- lib/portage/package/ebuild/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py index a68df5807..5c1404389 100644 --- a/lib/portage/package/ebuild/config.py +++ b/lib/portage/package/ebuild/config.py @@ -155,6 +155,9 @@ class config(object): _constant_keys = frozenset(['PORTAGE_BIN_PATH', 'PORTAGE_GID', 'PORTAGE_PYM_PATH', 'PORTAGE_PYTHONPATH']) + _deprecated_keys = {'PORTAGE_LOGDIR': 'PORT_LOGDIR', + 'PORTAGE_LOGDIR_CLEAN': 'PORT_LOGDIR_CLEAN'} + _setcpv_aux_keys = ('BDEPEND', 'DEFINED_PHASES', 'DEPEND', 'EAPI', 'HDEPEND', 'INHERITED', 'IUSE', 'REQUIRED_USE', 'KEYWORDS', 'LICENSE', 'PDEPEND', 'PROPERTIES', 'RDEPEND', 'SLOT', @@ -2653,6 +2656,14 @@ class config(object): except KeyError: pass + deprecated_key = self._deprecated_keys.get(mykey) + if deprecated_key is not None: + value = self._getitem(deprecated_key) + warnings.warn(_("Key %s has been renamed to %s. Please ", + "update your configuration") % (deprecated_key, mykey), + UserWarning) + return value + raise KeyError(mykey) def get(self, k, x=None): -- 2.13.6
signature.asc
Description: OpenPGP digital signature