public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Pascal Jäger" <pascal.jaeger@leimstift.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: sys-power/auto-cpufreq/
Date: Wed, 12 Oct 2022 08:01:17 +0000 (UTC)	[thread overview]
Message-ID: <1665560525.26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90.pascal.jaeger@gentoo> (raw)

commit:     26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90
Author:     Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de>
AuthorDate: Wed Oct 12 07:42:05 2022 +0000
Commit:     Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> 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 <pascal.jaeger <AT> 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
 }


             reply	other threads:[~2022-10-12  8:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  8:01 Pascal Jäger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-15 16:55 [gentoo-commits] repo/proj/guru:dev commit in: sys-power/auto-cpufreq/ Julien Roy
2024-08-11 18:42 Michal Vu
2024-08-11 18:42 Michal Vu
2024-08-12 23:17 Lucio Sauer
2024-08-13 15:34 Lucio Sauer
2024-08-13 15:34 Lucio Sauer
2024-08-31 10:46 Michal Vu
2024-09-11 11:36 Michal Vu
2024-09-11 14:42 Takuya Wakazono
2024-09-11 14:42 Takuya Wakazono
2024-10-31 13:18 David Roman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1665560525.26dc7a5f20bc7fc853bde67f326b7e3e2bc04d90.pascal.jaeger@gentoo \
    --to=pascal.jaeger@leimstift.de \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox