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 77D03138335 for ; Wed, 15 Aug 2018 07:31:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0094E093D; Wed, 15 Aug 2018 07:31:12 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 947B6E093D for ; Wed, 15 Aug 2018 07:31:12 +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 609BA335CE7 for ; Wed, 15 Aug 2018 07:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32EF43AB for ; Wed, 15 Aug 2018 07:31:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1534318258.fc5c1a6da74717d486a77d42c9c5b52977719c5d.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-opengl/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild X-VCS-Directories: app-eselect/eselect-opengl/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: fc5c1a6da74717d486a77d42c9c5b52977719c5d X-VCS-Branch: master Date: Wed, 15 Aug 2018 07:31:07 +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-Archives-Salt: c8a8cbcb-549d-46c2-a6bf-4b49e848e0b4 X-Archives-Hash: 1ac3a535337c25a3c9a3d7eefbee5a87 commit: fc5c1a6da74717d486a77d42c9c5b52977719c5d Author: Michał Górny gentoo org> AuthorDate: Thu Aug 9 14:49:40 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Aug 15 07:30:58 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc5c1a6d app-eselect/eselect-opengl: Replace path_exists Replace path_exists call with nullglob-based filename expansion. app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild b/app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild index 1206be17c26..d3f04c9469c 100644 --- a/app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild +++ b/app-eselect/eselect-opengl/eselect-opengl-1.3.1-r4.ebuild @@ -49,11 +49,15 @@ pkg_preinst() { } pkg_postinst() { - if path_exists "${EROOT}"/usr/lib*/opengl; then + local shopt_save=$(shopt -p nullglob) + shopt -s nullglob + local opengl_dirs=( "${EROOT}"/usr/lib*/opengl ) + ${shopt_save} + if [[ -n ${opengl_dirs[@]} ]]; then # delete broken symlinks - find "${EROOT}"/usr/lib*/opengl -xtype l -delete + find "${opengl_dirs[@]}" -xtype l -delete # delete empty leftover directories (they confuse eselect) - find "${EROOT}"/usr/lib*/opengl -depth -type d -empty -exec rmdir -v {} + + find "${opengl_dirs[@]}" -depth -type d -empty -exec rmdir -v {} + fi if [[ -n "${OLD_IMPL}" && "${OLD_IMPL}" != '(none)' ]] ; then