From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AEB701382C5 for ; Sat, 15 May 2021 22:01:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D03F5E081E; Sat, 15 May 2021 22:01:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9ED65E081E for ; Sat, 15 May 2021 22:01:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0F354340E96 for ; Sat, 15 May 2021 22:01:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F2A375F for ; Sat, 15 May 2021 22:01:12 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1621115359.0005bf29df8f6d99df07ef180219f5fe22ebb3d6.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/readme.gentoo.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 0005bf29df8f6d99df07ef180219f5fe22ebb3d6 X-VCS-Branch: master Date: Sat, 15 May 2021 22:01:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a8ddaa05-716d-402a-97e5-1bdceb5e8399 X-Archives-Hash: eaa6a7178ae8bba334868aa682d493aa commit: 0005bf29df8f6d99df07ef180219f5fe22ebb3d6 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat May 15 20:56:46 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat May 15 21:49:19 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0005bf29 readme.gentoo.eclass: Remove last-rited eclass Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/readme.gentoo.eclass | 140 -------------------------------------------- 1 file changed, 140 deletions(-) diff --git a/eclass/readme.gentoo.eclass b/eclass/readme.gentoo.eclass deleted file mode 100644 index c902605538a..00000000000 --- a/eclass/readme.gentoo.eclass +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @DEAD -# @ECLASS: readme.gentoo.eclass -# @MAINTAINER: -# Pacho Ramos -# @AUTHOR: -# Author: Pacho Ramos -# @SUPPORTED_EAPIS: 4 5 -# @BLURB: install a doc file shown via elog messages -# @DEPRECATED: readme.gentoo-r1 -# @DESCRIPTION: -# An eclass for installing a README.gentoo doc file recording tips -# shown via elog messages. With this eclass, those elog messages will only be -# shown at first package installation and a file for later reviewing will be -# installed under /usr/share/doc/${PF} - -if [[ -z ${_README_GENTOO_ECLASS} ]]; then -_README_GENTOO_ECLASS=1 - -inherit estack eutils - -case "${EAPI:-0}" in - 0|1|2|3) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 4|5) - # EAPI>=4 is required for REPLACING_VERSIONS preventing us - # from needing to export another pkg_preinst phase to save has_version - # result. Also relies on EAPI >=4 default src_install phase. - EXPORT_FUNCTIONS src_install pkg_postinst - ;; - 6) - die "Unsupported EAPI=${EAPI} for ${ECLASS}" - die "Please migrate to readme.gentoo-r1.eclass and note that" - die "it stops to export any ebuild phases and, then, you will" - die "need to ensure readme.gentoo_create_doc is called in" - die "src_install and readme.gentoo_print_elog in pkg_postinst" - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty, DOC_CONTENTS information will be strictly respected, -# not getting it automatically formatted by fmt. If empty, it will -# rely on fmt for formatting and 'echo -e' options to tweak lines a bit. - -# @ECLASS-VARIABLE: FORCE_PRINT_ELOG -# @DEFAULT_UNSET -# @DESCRIPTION: -# If non-empty this variable forces elog messages to be printed. - -# @ECLASS-VARIABLE: README_GENTOO_SUFFIX -# @DESCRIPTION: -# If you want to specify a suffix for README.gentoo file please export it. -: ${README_GENTOO_SUFFIX:=""} - -# @FUNCTION: readme.gentoo_create_doc -# @DESCRIPTION: -# Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set, -# look for "${FILESDIR}/README.gentoo" contents. You can use -# ${FILESDIR}/README.gentoo-${SLOT} also. -# Usually called at src_install phase. -readme.gentoo_create_doc() { - debug-print-function ${FUNCNAME} "${@}" - - if [[ -n "${DOC_CONTENTS}" ]]; then - eshopts_push - set -f - if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then - echo "${DOC_CONTENTS}" > "${T}"/README.gentoo - else - echo -e ${DOC_CONTENTS} | fold -s -w 70 \ - | sed 's/[[:space:]]*$//' > "${T}"/README.gentoo - fi - eshopts_pop - elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then - cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die - elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then - cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${T}"/README.gentoo || die - else - die "You are not specifying README.gentoo contents!" - fi - - dodoc "${T}"/README.gentoo - README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo") -} - -# @FUNCTION: readme.gentoo_print_elog -# @DESCRIPTION: -# Print elog messages with "${T}"/README.gentoo contents. They will be -# shown only when package is installed at first time. -# Usually called at pkg_postinst phase. -# -# If you want to show them always, please set FORCE_PRINT_ELOG to a non empty -# value in your ebuild before this function is called. -# This can be useful when, for example, DOC_CONTENTS is modified, then, you can -# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages -# when people update from versions still providing old message. -readme.gentoo_print_elog() { - debug-print-function ${FUNCNAME} "${@}" - - eqawarn "${CATEGORY}/${PN} is using the deprecated readme.gentoo.eclass." - eqawarn "Please use readme.gentoo-r1 instead." - - if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then - die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!" - elif ! [[ -n "${REPLACING_VERSIONS}" ]] || [[ -n "${FORCE_PRINT_ELOG}" ]]; then - echo -e "${README_GENTOO_DOC_VALUE}" | while read -r ELINE; do elog "${ELINE}"; done - elog "" - elog "(Note: Above message is only printed the first time package is" - elog "installed. Please look at ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*" - elog "for future reference)" - fi -} - - -# @FUNCTION: readme.gentoo_src_install -# @DESCRIPTION: -# Install generated doc file automatically. -readme.gentoo_src_install() { - debug-print-function ${FUNCNAME} "${@}" - default - readme.gentoo_create_doc -} - -# @FUNCTION: readme.gentoo_pkg_postinst -# @DESCRIPTION: -# Show elog messages from from just generated doc file. -readme.gentoo_pkg_postinst() { - debug-print-function ${FUNCNAME} "${@}" - readme.gentoo_print_elog -} - -fi