summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2023-04-03 11:28:49 -0600
committerMichał Górny <mgorny@gentoo.org>2023-04-04 06:48:47 +0200
commit65a031f4c9d702c4fc8b6ce6b0541453a6db8c08 (patch)
tree5eb1019203b0bdf379f7bea5dc6b3c6b3bba5aee /eclass
parentdev-python/pillow: Remove old (diff)
downloadgentoo-65a031f4c9d702c4fc8b6ce6b0541453a6db8c08.tar.gz
gentoo-65a031f4c9d702c4fc8b6ce6b0541453a6db8c08.tar.bz2
gentoo-65a031f4c9d702c4fc8b6ce6b0541453a6db8c08.zip
sgml-catalog-r1.eclass: Strip ROOT when generating catalog
When cross compiling by setting the ROOT variable, the eclass was writing the full EROOT path into the catalog file. This results in an invalid path at runtime. i.e., $ cat /build/amd64-host/etc/sgml/catalog CATALOG "/build/amd64-host/etc/sgml/sgml-docbook.cat" CATALOG "/build/amd64-host/etc/sgml/sgml-ent.cat" CATALOG "/build/amd64-host/etc/sgml/xml-docbook-4.1.2.cat" Instead we should be stripping off the ROOT so we get a valid path: $ cat /build/amd64-host/etc/sgml/catalog CATALOG "/etc/sgml/sgml-docbook.cat" CATALOG "/etc/sgml/sgml-ent.cat" CATALOG "/etc/sgml/xml-docbook-4.1.2.cat" We don't strip EROOT because we want to keep the prefix if it's present. Closes: https://bugs.gentoo.org/903747 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Closes: https://github.com/gentoo/gentoo/pull/30462 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/sgml-catalog-r1.eclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclass/sgml-catalog-r1.eclass b/eclass/sgml-catalog-r1.eclass
index 2258b3e2bf0f..eff6db31062f 100644
--- a/eclass/sgml-catalog-r1.eclass
+++ b/eclass/sgml-catalog-r1.eclass
@@ -35,7 +35,7 @@ sgml-catalog-r1_update_catalog() {
if [[ ${#cats[@]} -gt 0 ]]; then
ebegin "Updating ${EROOT}/etc/sgml/catalog"
- printf 'CATALOG "%s"\n' "${cats[@]}" > "${T}"/catalog &&
+ printf 'CATALOG "%s"\n' "${cats[@]#${ROOT}}" > "${T}"/catalog &&
mv "${T}"/catalog "${EROOT}"/etc/sgml/catalog
eend "${?}"
else