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 BE2C2138334 for ; Wed, 13 Feb 2019 18:26:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9603E0954; Wed, 13 Feb 2019 18:26:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 88FD5E0954 for ; Wed, 13 Feb 2019 18:26:42 +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 E801D335CFB for ; Wed, 13 Feb 2019 18:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 675C54D3 for ; Wed, 13 Feb 2019 18:26:39 +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: <1550082363.729fb4bab1f0cdc5e81e7a4d9af4db7717764b94.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/kde5.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 729fb4bab1f0cdc5e81e7a4d9af4db7717764b94 X-VCS-Branch: master Date: Wed, 13 Feb 2019 18:26:39 +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: 3f6056b1-02c8-4740-b976-25c36ce132ba X-Archives-Hash: c09415ec8a792313715569d396e7546f commit: 729fb4bab1f0cdc5e81e7a4d9af4db7717764b94 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Feb 11 21:51:07 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Feb 13 18:26:03 2019 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=729fb4ba kde5.eclass: Cleanup functions rented from xdg.eclass This reverts 16e6b9bc. Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/kde5.eclass | 128 +++-------------------------------------------------- 1 file changed, 5 insertions(+), 123 deletions(-) diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index c7f13aa623..b25679a76c 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -31,11 +31,10 @@ _KDE5_ECLASS=1 # for tests you should proceed with setting VIRTUALX_REQUIRED=test. : ${VIRTUALX_REQUIRED:=manual} -inherit cmake-utils flag-o-matic kde5-functions virtualx +inherit cmake-utils flag-o-matic kde5-functions virtualx xdg case ${EAPI} in - 6) inherit eapi7-ver eutils gnome2-utils xdg ;; - 7) inherit xdg-utils ;; + 6) inherit eapi7-ver eutils gnome2-utils ;; esac if [[ ${KDE_BUILD_TYPE} = live ]]; then @@ -718,120 +717,6 @@ kde5_src_install() { fi } -# @FUNCTION: _xdg_icon_cache_update -# @DESCRIPTION: Forked from future xdg-utils.eclass. REMOVEME! -# Updates Gtk+ icon cache files under /usr/share/icons. -# This function should be called from pkg_postinst and pkg_postrm. -_xdg_icon_cache_update() { - if [[ ${EBUILD_PHASE} != post* ]] ; then - die "xdg_icon_cache_update must be used in pkg_post* phases." - fi - - if ! type gtk-update-icon-cache &>/dev/null; then - debug-print "gtk-update-icon-cache is not found" - return - fi - - ebegin "Updating icons cache" - local retval=0 - local fails=( ) - for dir in "${EROOT%/}"/usr/share/icons/* - do - if [[ -f "${dir}/index.theme" ]] ; then - local rv=0 - gtk-update-icon-cache -qf "${dir}" - rv=$? - if [[ ! $rv -eq 0 ]] ; then - debug-print "Updating cache failed on ${dir}" - # Add to the list of failures - fails+=( "${dir}" ) - retval=2 - fi - elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then - # Clear stale cache files after theme uninstallation - rm "${dir}/icon-theme.cache" - fi - if [[ -z $(ls "${dir}") ]]; then - # Clear empty theme directories after theme uninstallation - rmdir "${dir}" - fi - done - eend ${retval} - for f in "${fails[@]}" ; do - eerror "Failed to update cache with icon $f" - done -} - -# @FUNCTION: _xdg_pkg_preinst -# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! -# Finds .desktop, icon and mime info files for later handling in pkg_postinst. -# Locations are stored in XDG_ECLASS_DESKTOPFILES, XDG_ECLASS_ICONFILES -# and XDG_ECLASS_MIMEINFOFILES respectively. -_xdg_pkg_preinst() { - local f - - XDG_ECLASS_DESKTOPFILES=() - while IFS= read -r -d '' f; do - XDG_ECLASS_DESKTOPFILES+=( ${f} ) - done < <(cd "${ED}" && find 'usr/share/applications' -type f -print0 2>/dev/null) - - XDG_ECLASS_ICONFILES=() - while IFS= read -r -d '' f; do - XDG_ECLASS_ICONFILES+=( ${f} ) - done < <(cd "${ED}" && find 'usr/share/icons' -type f -print0 2>/dev/null) - - XDG_ECLASS_MIMEINFOFILES=() - while IFS= read -r -d '' f; do - XDG_ECLASS_MIMEINFOFILES+=( ${f} ) - done < <(cd "${ED}" && find 'usr/share/mime' -type f -print0 2>/dev/null) -} - -# @FUNCTION: _xdg_pkg_postinst -# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! -# Handle desktop, icon and mime info database updates. -_xdg_pkg_postinst() { - if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then - xdg_desktop_database_update - else - debug-print "No .desktop files to add to database" - fi - - if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then - _xdg_icon_cache_update - else - debug-print "No icon files to add to cache" - fi - - if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then - xdg_mimeinfo_database_update - else - debug-print "No mime info files to add to database" - fi -} - -# @FUNCTION: _xdg_pkg_postrm -# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! -# Handle desktop, icon and mime info database updates. -_xdg_pkg_postrm() { - if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then - xdg_desktop_database_update - else - debug-print "No .desktop files to add to database" - fi - - if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then - _xdg_icon_cache_update - else - debug-print "No icon files to add to cache" - fi - - if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then - xdg_mimeinfo_database_update - else - debug-print "No mime info files to add to database" - fi -} - # @FUNCTION: kde5_pkg_preinst # @DESCRIPTION: # Sets up environment variables required in kde5_pkg_postinst. @@ -839,8 +724,7 @@ kde5_pkg_preinst() { debug-print-function ${FUNCNAME} "$@" [[ ${EAPI} == 6 ]] && gnome2_icon_savelist - [[ ${EAPI} == 6 ]] && xdg_pkg_preinst - [[ ${EAPI} == 7 ]] && _xdg_pkg_preinst + xdg_pkg_preinst } # @FUNCTION: kde5_pkg_postinst @@ -852,8 +736,7 @@ kde5_pkg_postinst() { if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - [[ ${EAPI} == 6 ]] && xdg_pkg_postinst - [[ ${EAPI} == 7 ]] && _xdg_pkg_postinst + xdg_pkg_postinst if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then if [[ ${KDE_BUILD_TYPE} = live ]]; then @@ -874,8 +757,7 @@ kde5_pkg_postrm() { if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - [[ ${EAPI} == 6 ]] && xdg_pkg_postrm - [[ ${EAPI} == 7 ]] && _xdg_pkg_postrm + xdg_pkg_postrm } fi