* [gentoo-portage-dev] [PATCH 1/3] misc-functions.sh: Inline prepinfo code in install_qa_check()
@ 2023-04-04 21:46 Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 2/3] prepinfo: Deprecate it Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 3/3] prepman: " Ulrich Müller
0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Müller @ 2023-04-04 21:46 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Ulrich Müller
Add a deprecation warning. Presumably, subdirs of /usr/share/info have
never been used by any package except app-editors/emacs.
Remove duplicate rm statement at the end of the function.
Bug: https://bugs.gentoo.org/899898
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
bin/misc-functions.sh | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 55c4afe73..235823afc 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# Miscellaneous shell functions that make use of the ebuild env but don't need
@@ -143,7 +143,24 @@ install_qa_check() {
chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
fi
- [[ -d ${ED%/}/usr/share/info ]] && prepinfo
+ if [[ -d ${ED%/}/usr/share/info ]]; then
+ # Portage regenerates this on the installed system.
+ rm -f "${ED%/}"/usr/share/info/dir{,.info}{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst} \
+ || die "rm failed"
+ # Recurse into subdirs. Remove this code after 2023-12-31. #899898
+ while read -r -d '' x; do
+ ( shopt -s failglob; : "${x}"/.keepinfodir* ) 2>/dev/null \
+ && continue
+ for f in "${x}"/dir{,.info}{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst}; do
+ if [[ -e ${f} ]]; then
+ eqawarn "QA Notice: Removing Info directory file '${f}'."
+ eqawarn "Relying on this behavior is deprecated and may"
+ eqawarn "cause file collisions in future."
+ rm -f "${f}" || die "rm failed"
+ fi
+ done
+ done < <(find "${ED%/}"/usr/share/info -mindepth 1 -type d -print0)
+ fi
# If binpkg-docompress is enabled, apply compression before creating
# the binary package.
@@ -251,9 +268,6 @@ install_qa_check() {
prepallstrip
fi
fi
-
- # Portage regenerates this on the installed system.
- rm -f "${ED%/}"/usr/share/info/dir{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst} || die "rm failed!"
}
__dyn_instprep() {
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-portage-dev] [PATCH 2/3] prepinfo: Deprecate it
2023-04-04 21:46 [gentoo-portage-dev] [PATCH 1/3] misc-functions.sh: Inline prepinfo code in install_qa_check() Ulrich Müller
@ 2023-04-04 21:46 ` Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 3/3] prepman: " Ulrich Müller
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Müller @ 2023-04-04 21:46 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Ulrich Müller
According to PMS, calling prepinfo from ebuilds was never allowed.
Last usage in Gentoo repository has been removed on 2018-11-22.
Bug: https://bugs.gentoo.org/899898
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
bin/ebuild-helpers/prepinfo | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 14fa38226..af5ae9f08 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
if ! ___eapi_has_prefix_variables ; then
ED=${D}
fi
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-portage-dev] [PATCH 3/3] prepman: Deprecate it
2023-04-04 21:46 [gentoo-portage-dev] [PATCH 1/3] misc-functions.sh: Inline prepinfo code in install_qa_check() Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 2/3] prepinfo: Deprecate it Ulrich Müller
@ 2023-04-04 21:46 ` Ulrich Müller
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Müller @ 2023-04-04 21:46 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Ulrich Müller
According to PMS, calling prepman from ebuilds was never allowed.
Last usage in Gentoo repository has been removed on 2019-04-14.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
bin/ebuild-helpers/prepman | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 871fd589b..0c0a7e812 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -1,8 +1,12 @@
#!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: this really does nothing these days. It's going to be banned
# when the last consumers are gone.
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
exit 0
--
2.40.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-04 21:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 21:46 [gentoo-portage-dev] [PATCH 1/3] misc-functions.sh: Inline prepinfo code in install_qa_check() Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 2/3] prepinfo: Deprecate it Ulrich Müller
2023-04-04 21:46 ` [gentoo-portage-dev] [PATCH 3/3] prepman: " Ulrich Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox