From 28d9c87f437e31f2ec49d2fc05cb73b0118c7142 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 16:37:30 +0100 Subject: [PATCH] eclass/sgml-catalog-r1: Sync with gentoo It's from gentoo commit 385cffdb297bd3976244d43d5d8e908d67001c20. --- .../eclass/sgml-catalog-r1.eclass | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/sgml-catalog-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/sgml-catalog-r1.eclass index 1e1f17815a..9f8bb13d60 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/sgml-catalog-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/sgml-catalog-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 2019 Gentoo Authors +# Copyright 2019-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: sgml-catalog-r1.eclass @@ -9,9 +9,8 @@ # @SUPPORTED_EAPIS: 7 # @BLURB: Functions for installing SGML catalogs # @DESCRIPTION: -# This eclass regenerates /etc/sgml/catalog, /etc/sgml.{,c}env -# and /etc/env.d/93sgmltools-lite as necessary for the DocBook tooling. -# This is done via exported pkg_postinst and pkg_postrm phases. +# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook +# tooling. This is done via exported pkg_postinst and pkg_postrm phases. case ${EAPI:-0} in 7) ;; @@ -50,16 +49,9 @@ sgml-catalog-r1_update_catalog() { # @FUNCTION: sgml-catalog-r1_update_env # @DESCRIPTION: -# Regenerate environment variables and copy them to env.d. +# Remove obsolete environment files. They can break tools such as asciidoc. sgml-catalog-r1_update_env() { - # gensgmlenv doesn't support overriding root - if [[ -z ${ROOT} && -x "${EPREFIX}/usr/bin/gensgmlenv" ]]; then - ebegin "Regenerating SGML environment variables" - gensgmlenv && - grep -v export "${EPREFIX}/etc/sgml/sgml.env" > "${T}"/93sgmltools-lite && - mv "${T}"/93sgmltools-lite "${EPREFIX}/etc/env.d/93sgmltools-lite" - eend "${?}" - fi + rm -f "${EROOT}"/etc/env.d/93sgmltools-lite "${EROOT}"/etc/sgml/sgml.{,c}env } sgml-catalog-r1_pkg_postinst() {