mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
sys-power/tlp: dependency and style fixes
The sys-power/tlp-1.9.0 ebuild had several bugs around dependency and style: - Blockers against tuned, laptop-mode-tools, and power-profiles-daemon were too aggressive. Moved to a warning instead of a hard block to make migrations easy/possible. - non-standard gentoo style of repeating use? ( pkg ) in each row instead of using one use? () block for multiple packages - dbus-python and pygobject were missing the proper dynamic python use dependencies. - renaming USE=pd to USE=ppd for consistency with tuned The original commit had more changes than would be expected due to it adding a tlp-pd daemon which implements power-profile-daemon abilities. As part of this, we noticed and added additional dependencies as documented here: https://linrunner.de/tlp/developers/dependencies.html Closes: https://bugs.gentoo.org/967685 Closes: https://bugs.gentoo.org/967686 Closes: https://bugs.gentoo.org/967687 Signed-off-by: Jay Faulkner <jayf@gentoo.org>
This commit is contained in:
parent
29da4cb946
commit
bce371ced2
@ -10,7 +10,7 @@
|
|||||||
kernel settings that affect power consumption.
|
kernel settings that affect power consumption.
|
||||||
</longdescription>
|
</longdescription>
|
||||||
<use>
|
<use>
|
||||||
<flag name="pd">TLP Profiles Daemon that replaces power-profiles-daemon by using the same D-Bus API.</flag>
|
<flag name="ppd">TLP Profiles Daemon that replaces power-profiles-daemon by using the same D-Bus API.</flag>
|
||||||
<flag name="rdw">Enables TLP Radio Device Wizard feature</flag>
|
<flag name="rdw">Enables TLP Radio Device Wizard feature</flag>
|
||||||
</use>
|
</use>
|
||||||
<upstream>
|
<upstream>
|
||||||
|
|||||||
@ -15,27 +15,27 @@ S="${WORKDIR}/TLP-${PV}"
|
|||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
REQUIRED_USE="pd? ( ${PYTHON_REQUIRED_USE} )"
|
REQUIRED_USE="ppd? ( ${PYTHON_REQUIRED_USE} )"
|
||||||
|
|
||||||
IUSE="
|
IUSE="
|
||||||
+pd
|
+ppd
|
||||||
+rdw
|
+rdw
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# NOTE(JayF): Upstream dep list in human-readable format:
|
||||||
|
# https://linrunner.de/tlp/developers/dependencies.html
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
dev-lang/perl
|
dev-lang/perl
|
||||||
virtual/udev
|
|
||||||
sys-apps/hdparm
|
|
||||||
net-wireless/iw
|
net-wireless/iw
|
||||||
!app-laptop/laptop-mode-tools
|
sys-apps/hdparm
|
||||||
sys-apps/pciutils
|
sys-apps/pciutils
|
||||||
!sys-apps/tuned
|
|
||||||
sys-apps/usbutils
|
sys-apps/usbutils
|
||||||
pd? ( dev-python/dbus-python )
|
virtual/udev
|
||||||
pd? ( !sys-power/power-profiles-daemon )
|
ppd? (
|
||||||
pd? ( dev-python/pygobject )
|
$(python_gen_cond_dep 'dev-python/dbus-python[${PYTHON_USEDEP}]')
|
||||||
pd? ( ${PYTHON_DEPS} )
|
$(python_gen_cond_dep 'dev-python/pygobject[${PYTHON_USEDEP}]')
|
||||||
pd? ( !sys-apps/tuned )
|
${PYTHON_DEPS}
|
||||||
|
)
|
||||||
rdw? ( net-misc/networkmanager )
|
rdw? ( net-misc/networkmanager )
|
||||||
"
|
"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
@ -51,7 +51,7 @@ src_install() {
|
|||||||
install-tlp install-man-tlp
|
install-tlp install-man-tlp
|
||||||
)
|
)
|
||||||
|
|
||||||
use pd && myemakeargs+=(
|
use ppd && myemakeargs+=(
|
||||||
install-pd
|
install-pd
|
||||||
install-man-pd
|
install-man-pd
|
||||||
)
|
)
|
||||||
@ -76,6 +76,30 @@ pkg_postinst() {
|
|||||||
optfeature "see disk drive health info in tlp-stat" sys-apps/smartmontools
|
optfeature "see disk drive health info in tlp-stat" sys-apps/smartmontools
|
||||||
optfeature "Sleep hooks" sys-auth/elogind sys-apps/systemd
|
optfeature "Sleep hooks" sys-auth/elogind sys-apps/systemd
|
||||||
optfeature "Battery functions for ThinkPads prior to the Sandy Bridge generation (2011)" app-laptop/tp_smapi
|
optfeature "Battery functions for ThinkPads prior to the Sandy Bridge generation (2011)" app-laptop/tp_smapi
|
||||||
|
|
||||||
|
if has_version "sys-power/power-profiles-daemon" && use ppd; then
|
||||||
|
ewarn
|
||||||
|
ewarn "sys-power/power-profiles-daemon is installed, but is "
|
||||||
|
ewarn "incompatible with tlp-pd daemon. For best results, "
|
||||||
|
ewarn "uninstall one of these packages or set use tlp[-ppd]."
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
|
||||||
|
if has_version "sys-apps/tuned"; then
|
||||||
|
ewarn
|
||||||
|
ewarn "sys-apps/tuned is installed, but is "
|
||||||
|
ewarn "documented by upstream sys-power/tlp to be conficting. "
|
||||||
|
ewarn "For best results, uninstall one of these packages."
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
|
|
||||||
|
if has_version "app-laptop/laptop-mode-tools"; then
|
||||||
|
ewarn
|
||||||
|
ewarn "app-laptop/laptop-mode-tools is installed, but is "
|
||||||
|
ewarn "documented by upstream sys-power/tlp to be conficting. "
|
||||||
|
ewarn "For best results, uninstall one of these packages."
|
||||||
|
ewarn
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm() {
|
pkg_postrm() {
|
||||||
Loading…
x
Reference in New Issue
Block a user