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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4F9DD158020 for ; Wed, 12 Oct 2022 08:01:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 81F27E0998; Wed, 12 Oct 2022 08:01:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 64208E0998 for ; Wed, 12 Oct 2022 08:01:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3540B335C7B for ; Wed, 12 Oct 2022 08:01:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92E645F1 for ; Wed, 12 Oct 2022 08:01:17 +0000 (UTC) From: "Pascal Jäger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Pascal Jäger" Message-ID: <1665560525.26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90.pascal.jaeger@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-power/auto-cpufreq/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild X-VCS-Directories: sys-power/auto-cpufreq/ X-VCS-Committer: pascal.jaeger X-VCS-Committer-Name: Pascal Jäger X-VCS-Revision: 26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90 X-VCS-Branch: dev Date: Wed, 12 Oct 2022 08:01:17 +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: bf1e78bc-0a24-4fb9-a562-3b99d4f606ac X-Archives-Hash: a76fa4080d8a7ec90b2cf779264c85af commit: 26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90 Author: Pascal Jäger leimstift de> AuthorDate: Wed Oct 12 07:42:05 2022 +0000 Commit: Pascal Jäger leimstift de> CommitDate: Wed Oct 12 07:42:05 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=26dc7a5f sys-power/auto-cpufreq: changed pkg_postrm Signed-off-by: Pascal Jäger leimstift.de> sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild b/sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild index a8086ac3b..8eeb4764a 100644 --- a/sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild +++ b/sys-power/auto-cpufreq/auto-cpufreq-1.9.6.ebuild @@ -18,9 +18,11 @@ KEYWORDS="~amd64" SLOT="0" IUSE="systemd" -RDEPEND="dev-python/psutil +RDEPEND=" + dev-python/psutil dev-python/click - dev-python/distro" + dev-python/distro +" DEPEND="${RDEPEND}" @@ -49,6 +51,7 @@ python_install() { pkg_postinst() { touch /var/log/auto-cpufreq.log + elog "" elog "Enable auto-cpufreq daemon service at boot:" if use systemd; then elog "systemctl enable --now auto-cpufreq" @@ -57,19 +60,23 @@ pkg_postinst() { fi elog "" elog "To view live log, run:" - elog "auto-cpufreq --log" + elog "auto-cpufreq --stats" } pkg_postrm() { # Remove auto-cpufreq log file - rm /var/log/auto-cpufreq.log + if [ -f "/var/log/auto-cpufreq.log" ]; then + rm /var/log/auto-cpufreq.log || die + fi # Remove auto-cpufreq's cpufreqctl binary - # it copies cpufreqctl.sh over (I do NOT like this behavior) - rm /usr/bin/cpufreqctl + # it overwrites cpufreqctl.sh + if [ -f "/usr/bin/cpufreqctl" ]; then + rm /usr/bin/cpufreqctl || die + fi # Restore original cpufreqctl binary if backup was made if [ -f "/usr/bin/cpufreqctl.auto-cpufreq.bak" ]; then - mv /usr/bin/cpufreqctl.auto-cpufreq.bak /usr/bin/cpufreqctl + mv /usr/bin/cpufreqctl.auto-cpufreq.bak /usr/bin/cpufreqctl || die fi }