summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2008-02-08 20:11:00 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2008-02-08 20:11:00 +0000
commita284fe70ea46ff836453465714910c792c9b0893 (patch)
treeadfcc200c52a6b883d55cea0836e424665f84df1 /sys-apps/hal
parentstable x86, bug 207231 (diff)
downloadhistorical-a284fe70ea46ff836453465714910c792c9b0893.tar.gz
historical-a284fe70ea46ff836453465714910c792c9b0893.tar.bz2
historical-a284fe70ea46ff836453465714910c792c9b0893.zip
Refactoring Linux kernel checks so hal doesn't bomb out on an unconfigured kernel. Closing bug #209025.
Package-Manager: portage-2.1.4
Diffstat (limited to 'sys-apps/hal')
-rw-r--r--sys-apps/hal/ChangeLog8
-rw-r--r--sys-apps/hal/Manifest24
-rw-r--r--sys-apps/hal/hal-0.5.10.ebuild72
-rw-r--r--sys-apps/hal/hal-0.5.7.1-r5.ebuild68
-rw-r--r--sys-apps/hal/hal-0.5.9-r1.ebuild64
-rw-r--r--sys-apps/hal/hal-0.5.9.1-r1.ebuild64
-rw-r--r--sys-apps/hal/hal-0.5.9.1-r2.ebuild64
-rw-r--r--sys-apps/hal/hal-0.5.9.1-r3.ebuild65
8 files changed, 189 insertions, 240 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog
index 880dabc4c8e6..c9727a3c50d6 100644
--- a/sys-apps/hal/ChangeLog
+++ b/sys-apps/hal/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/hal
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.224 2008/01/10 18:05:15 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.225 2008/02/08 20:11:00 wolf31o2 Exp $
+
+ 08 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> hal-0.5.7.1-r5.ebuild,
+ hal-0.5.9-r1.ebuild, hal-0.5.9.1-r1.ebuild, hal-0.5.9.1-r2.ebuild,
+ hal-0.5.9.1-r3.ebuild, hal-0.5.10.ebuild:
+ Refactoring Linux kernel checks so hal doesn't bomb out on an unconfigured
+ kernel. Closing bug #209025.
10 Jan 2008; Jeroen Roovers <jer@gentoo.org> hal-0.5.10.ebuild:
Marked ~hppa (bug #200050).
diff --git a/sys-apps/hal/Manifest b/sys-apps/hal/Manifest
index fe1b88cd89df..97d49602ef70 100644
--- a/sys-apps/hal/Manifest
+++ b/sys-apps/hal/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 0.5-hald.rc 681 RMD160 f94d4a6e4ffb3beb84eeeb8e25564fa566ecc493 SHA1 fe413a84ee58cefa923cbc922a1c961fbdb17aa6 SHA256 802f83998c50a3e030d1db2f5a8364e4bb10eebecd464683445d63cf56702161
AUX 0.5.10-hald.conf 119 RMD160 06e205ba7fa8acfb6f68e84a247845a3ad028351 SHA1 c8a62a808c7f632154dda1686fe344a4a136e28f SHA256 b19e6df9c78b6f813405a7cbff20e049714db1a000e6b71ab2eca02d372d58af
AUX 0.5.10-hald.rc 1111 RMD160 e4b6aaf254a8b909781006151d40060990681412 SHA1 3ab3c81517ee286a6407ff7e068b1ab0e2695fe5 SHA256 6c36fb7d9c2e3f29e9f35332a7ea97ba85d977de4cdd6b355e3a7d6c2b82aca7
@@ -63,11 +66,18 @@ DIST hal-0.5.7.1.tar.gz 1503156 RMD160 2861818b29546bd3628b1bda3d41238cf644c644
DIST hal-0.5.9.1-r2.tar.bz2 4246 RMD160 2b1646289c23db868bd969f7ae851e6c2d317bad SHA1 32db287e0eff7f4754b89633909daf0f6e957009 SHA256 f28ed6e02df926ef485fff79587856eb0155c747e311d83d1b6b5e3a25b924c2
DIST hal-0.5.9.1.tar.gz 1596347 RMD160 4f1f8b9513d4e168d4d043970c062cc9084f554f SHA1 fc29322a0beba73c2eab3e0a44f9b820a5fbccdd SHA256 5dc5cf08502510a00cecd6e04ef006a74ba7ed4b31d25187b5efadd70a78733b
DIST hal-0.5.9.tar.gz 1587364 RMD160 bc97bf63e35d36bdb5731c3447036425dc7adeb9 SHA1 5832d97bcaf3dabb9aeb919226e3c38d366057ac SHA256 65d8f8eeb61e7609a8c5001b6660d90e7a482c4b74b4e226d09b433dc1a80c9d
-EBUILD hal-0.5.10.ebuild 8919 RMD160 9c2de4481915da2f0b699ba8995c90d95162901e SHA1 2923f02aef7f20462180c131c378a372127ea9d5 SHA256 21dcc3b9a271c86c83525874946aa1872de42700866d01206d605c996e81ff95
-EBUILD hal-0.5.7.1-r5.ebuild 6460 RMD160 4cbe3eda7a34735516dd5c53ab1037e7eab1817d SHA1 8518e69c6787353ab0944d25c07fb5f4f0ed705b SHA256 0bb6785cf30dc03385ed79232628a8668dee9a585ee4284078437e773041d594
-EBUILD hal-0.5.9-r1.ebuild 8655 RMD160 412ca40b267d3d7e5e3994743f9f0941a6629066 SHA1 82a4b200c99614ae02780dd94a856806418f6a0d SHA256 211ef1ee40537ee99cfb05c49e9417acaaa2dd8db91bb1445a24fdb30e2ad84a
-EBUILD hal-0.5.9.1-r1.ebuild 7729 RMD160 301b2f240acdf3d24802d2f8dc67d5f6cad6bc60 SHA1 95679f1aa5ca1f90458de3451cf6ec7bd7f6fb26 SHA256 c19f41e9b06b00c25445e740bb675e71863e3a0cf60318d6d8fa40d047069926
-EBUILD hal-0.5.9.1-r2.ebuild 7405 RMD160 b29599e85552d3163b9febbd34d3259cf1d74b52 SHA1 a4df1fa0cad23e8860b08ac278d8197ce4fb405e SHA256 4f89f46c210065b49bb73a693bdee0e71825db11fa7f90092e2c5b8a881a422d
-EBUILD hal-0.5.9.1-r3.ebuild 7111 RMD160 20dee0c64395c72f7e4b5d82df32dfcf4e758c40 SHA1 4649a4ed8ceca0634b9d32155b53612069447f98 SHA256 623c58e7e00a8eb257a66b5ff18bd431fce1b340ea83bec0cdff8a633019ff85
-MISC ChangeLog 36277 RMD160 53d32e5c7d424a9565161f9bd2cf37d46d9d5ef1 SHA1 1ba7bf407d4d7ccb466fc119cfa17b6de6863838 SHA256 9197b0766fd8f7c725ad14c474d81e151d7bbceafb5e13dd53e722c3d3840676
+EBUILD hal-0.5.10.ebuild 8265 RMD160 db9c4b9a91559b9fb2bfe437439d5f7c8f3dad01 SHA1 554174d4ed87aa86318ac4cf4b34eb1d3e956721 SHA256 8373433ac6ed656a6afc3e2de9bfcd0d1cf1e3c07d32e8108acb584235c9f8c7
+EBUILD hal-0.5.7.1-r5.ebuild 6121 RMD160 642b12e9ccdf902d4586655d994f7ad93da3518c SHA1 006314b4992ee675ae1f03097ef1fefb0525ecc3 SHA256 c4fb11aa893c1af6a824cb0767b5e12479dd67ad808502f9d2d3fef5d6205210
+EBUILD hal-0.5.9-r1.ebuild 8182 RMD160 d46bae1f5a9ca5720e5ce42404401420ac07c29f SHA1 8ee739922f9c8061ae75dd13a21e0fe1099c0cc2 SHA256 c2d06a8629ed2b8f7160ace944d416482c6ea70987aca5c685e84ae441074ea7
+EBUILD hal-0.5.9.1-r1.ebuild 7256 RMD160 6446cc8593da03f170d4d302b321ffe1073b6bdc SHA1 2fc6f1c94190b0c1fcfc9d14cf238c732c6d2cb6 SHA256 e33fb5c4ffed8fdc51fa39badaecf936bbf8018077fd284152e7fc98ee15d9bf
+EBUILD hal-0.5.9.1-r2.ebuild 6932 RMD160 ecd5ab3c81cc9db6d0c4e9667ae3542407108c11 SHA1 00819280e9f8ea08689b8df740c32fa961a9dc16 SHA256 cf226ceec3328cbfc0d90cc97f66302d4a93232cc6496dbbc687afc54d14932d
+EBUILD hal-0.5.9.1-r3.ebuild 6921 RMD160 bf0a00c27e679bb96de52ee8a301ca77b51a0f55 SHA1 b062a78caccd69c094e5c4a02cc46852d7ce1639 SHA256 ed6c22679e3343e2195a9594042b67e97ee18850d827c6422e22fddd68ec4f05
+MISC ChangeLog 36581 RMD160 8cb56322489ccb86091cbbeb2661de029f27e1a3 SHA1 7f22ebd941c53f9e902751037d23f108e9bdbea7 SHA256 73cb74e92904bf16d18acfd477f43eaddc7433a67ae67a54f15811c779a85fd8
MISC metadata.xml 1936 RMD160 c9a2cc56d91ca9a12850cbbe68dd36079da0ccae SHA1 a0ccb91c8a4288cc6021ccc0c4c939bd2dad9570 SHA256 e73a89f3e8c110c5bd93a4bcc16c89e97067dfda97b4a4d6dc27330d9b5e51ee
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.8 (GNU/Linux)
+
+iEYEARECAAYFAkest1kACgkQkT4lNIS36YEfGwCZAY5JtiQblSmgsCAd/UOcmmbO
+xV0An2By6OUsxKCEojCTMp3xruXR9Jpr
+=O7nC
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/hal/hal-0.5.10.ebuild b/sys-apps/hal/hal-0.5.10.ebuild
index 092cd3dffa00..2de384c4bb87 100644
--- a/sys-apps/hal/hal-0.5.10.ebuild
+++ b/sys-apps/hal/hal-0.5.10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.10.ebuild,v 1.8 2008/01/10 18:05:15 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.10.ebuild,v 1.9 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info autotools flag-o-matic
@@ -66,59 +66,41 @@ PDEPEND=">=app-misc/hal-info-20071011
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
-}
-
-function notify_inotify() {
- ewarn
- ewarn "You must enable the Inotify system in your kernel."
- ewarn "For this you need to enable 'Inotify support for userspace'"
- ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_acpi_procfs() {
- ewarn
- ewarn "You must enable support for the ACPI proc files in your kernel."
- ewarn "For this you need to enable '/proc/acpi files' in"
- ewarn "'ACPI Support (Advanced Configuration and Power Interface) Support'."
- ewarn "It is marked ewarn CONFIG_ACPI_PROCFS in the config file."
- ewarn
- ebeep 5
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_acpi_proc_event() {
- ewarn
- ewarn "You have not enabled support for the /proc/acpi/event interface."
- ewarn "For this you need to enable '/proc/acpi/event support' in"
- ewarn "ACPI Support (Advanced Configuration and Power Interface) Support"
- ewarn
- ebeep 5
+function check_acpi_proc() {
+ local CONFIG_CHECK="~ACPI_PROCFS ~ACPI_PROC_EVENT"
+ local WARNING_ACPI_PROCFS="CONFIG_ACPI_PROCFS:\tis not set (required for HAL)"
+ local WARNING_ACPI_PROC_EVENT="CONFIG_ACPI_PROC_EVENT:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if use kernel_linux; then
- kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer"
-
- if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
- then
- notify_uevent
+ if use kernel_linux ; then
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ kernel_is ge 2 6 19 || \
+ ewarn "HAL requires a kernel version 2.6.19 or newer"
+ if kernel_is lt 2 6 23 && use acpi ; then
+ check_acpi_proc
+ fi
fi
- linux_chkconfig_present INOTIFY_USER || notify_inotify
-
- if kernel_is lt 2 6 23 && use acpi ; then
- linux_chkconfig_present ACPI_PROCFS || notify_acpi_procfs
- linux_chkconfig_present ACPI_PROC_EVENT || notify_acpi_proc_event
- fi
+ check_hotplug_net
+ check_inotify
fi
# http://devmanual.gentoo.org/ebuild-writing/functions/
diff --git a/sys-apps/hal/hal-0.5.7.1-r5.ebuild b/sys-apps/hal/hal-0.5.7.1-r5.ebuild
index a43725087cb2..f371c0eeba31 100644
--- a/sys-apps/hal/hal-0.5.7.1-r5.ebuild
+++ b/sys-apps/hal/hal-0.5.7.1-r5.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r5.ebuild,v 1.16 2007/11/23 06:43:51 compnerd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.7.1-r5.ebuild,v 1.17 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info
@@ -34,54 +34,46 @@ DEPEND="${RDEPEND}
## HAL Daemon drops privledges so we need group access to read disks
HALDAEMON_GROUPS="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "This can be set under 'General Setup'. It is marked as"
- ewarn "CONFIG_KOBJECT_UEVENT in the config file."
- ewarn
- ebeep 5
+function check_uevent() {
+ local CONFIG_CHECK="~KOBJECT_UEVENT"
+ local WARNING_KOBJECT_UEVENT="CONFIG_KOBJECT_UEVENT:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_uevent_2_6_16() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_procfs() {
- ewarn
- ewarn "You must enable the proc filesystem in your kernel."
- ewarn "For this you need to enable '/proc file system support' under"
- ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
- ewarn "CONFIG_PROC_FS in the config file."
- ewarn
- ebeep 5
+function check_procfs() {
+ local CONFIG_CHECK="~PROC_FS"
+ local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if has_version =sys-apps/pciutils-2.2.4* ; then
- if built_with_use --missing true =sys-apps/pciutils-2.2.4* zlib ; then
- die "You MUST build pciutils without the zlib USE flag"
+ if ! built_with_use --missing true sys-apps/pciutils hal ; then
+ if built_with_use --missing false sys-apps/pciutils zlib ; then
+ die "You MUST build sys-apps/pciutils without the zlib USE flag"
fi
fi
- kernel_is ge 2 6 15 || ewarn "HAL requires a kernel version 2.6.15 or newer"
-
- if kernel_is lt 2 6 16 ; then
- linux_chkconfig_present KOBJECT_UEVENT || notify_uevent
- else
- (linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET) \
- || notify_uevent_2_6_16
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ if kernel_is ge 2 6 16 ; then
+ check_hotplug_net
+ elif kernel_is eq 2 6 15 ; then
+ check_uevent
+ else
+ ewarn "HAL requires a kernel version 2.6.15 or newer"
+ fi
fi
- if use acpi ; then
- linux_chkconfig_present PROC_FS || notify_procfs
- fi
+ use acpi && check_procfs
if [ -d "${ROOT}/etc/hal/device.d" ]; then
eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
diff --git a/sys-apps/hal/hal-0.5.9-r1.ebuild b/sys-apps/hal/hal-0.5.9-r1.ebuild
index 080fcf767294..19a53c509280 100644
--- a/sys-apps/hal/hal-0.5.9-r1.ebuild
+++ b/sys-apps/hal/hal-0.5.9-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9-r1.ebuild,v 1.18 2007/11/23 06:43:51 compnerd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9-r1.ebuild,v 1.19 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info autotools flag-o-matic
@@ -50,56 +50,44 @@ PDEPEND="app-misc/hal-info"
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_procfs() {
- ewarn
- ewarn "You must enable the proc filesystem in your kernel."
- ewarn "For this you need to enable '/proc file system support' under"
- ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
- ewarn "CONFIG_PROC_FS in the config file."
- ewarn
- ebeep 5
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_inotify() {
- ewarn
- ewarn "You must enable the Inotify system in your kernel."
- ewarn "For this you need to enable 'Inotify support for userspace'"
- ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
- ewarn
- ebeep 5
+function check_procfs() {
+ local CONFIG_CHECK="~PROC_FS"
+ local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if ! built_with_use --missing false sys-apps/pciutils hal ; then
+ if ! built_with_use --missing true sys-apps/pciutils hal ; then
if built_with_use --missing false sys-apps/pciutils zlib ; then
- eerror "You MUST build sys-apps/pciutils without the zlib USE flag"
die "You MUST build sys-apps/pciutils without the zlib USE flag"
fi
fi
- if use kernel_linux; then
- kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
-
- if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
- then
- notify_uevent
+ if use kernel_linux ; then
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ kernel_is ge 2 6 17 || \
+ ewarn "HAL requires a kernel version 2.6.17 or newer"
fi
- linux_chkconfig_present INOTIFY_USER || notify_inotify
-
- if use acpi ; then
- linux_chkconfig_present PROC_FS || notify_procfs
- fi
+ check_hotplug_net
+ check_inotify
+ use acpi && check_procfs
fi
if [[ -d ${ROOT}/etc/hal/device.d ]]; then
diff --git a/sys-apps/hal/hal-0.5.9.1-r1.ebuild b/sys-apps/hal/hal-0.5.9.1-r1.ebuild
index 50617f8943a2..afb9b28de2ac 100644
--- a/sys-apps/hal/hal-0.5.9.1-r1.ebuild
+++ b/sys-apps/hal/hal-0.5.9.1-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r1.ebuild,v 1.10 2007/11/23 06:43:51 compnerd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r1.ebuild,v 1.11 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info autotools flag-o-matic
@@ -50,56 +50,44 @@ PDEPEND="app-misc/hal-info"
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_procfs() {
- ewarn
- ewarn "You must enable the proc filesystem in your kernel."
- ewarn "For this you need to enable '/proc file system support' under"
- ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
- ewarn "CONFIG_PROC_FS in the config file."
- ewarn
- ebeep 5
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_inotify() {
- ewarn
- ewarn "You must enable the Inotify system in your kernel."
- ewarn "For this you need to enable 'Inotify support for userspace'"
- ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
- ewarn
- ebeep 5
+function check_procfs() {
+ local CONFIG_CHECK="~PROC_FS"
+ local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if ! built_with_use --missing false sys-apps/pciutils hal ; then
+ if ! built_with_use --missing true sys-apps/pciutils hal ; then
if built_with_use --missing false sys-apps/pciutils zlib ; then
- eerror "You MUST build sys-apps/pciutils without the zlib USE flag"
die "You MUST build sys-apps/pciutils without the zlib USE flag"
fi
fi
- if use kernel_linux; then
- kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
-
- if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
- then
- notify_uevent
+ if use kernel_linux ; then
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ kernel_is ge 2 6 17 || \
+ ewarn "HAL requires a kernel version 2.6.17 or newer"
fi
- linux_chkconfig_present INOTIFY_USER || notify_inotify
-
- if use acpi ; then
- linux_chkconfig_present PROC_FS || notify_procfs
- fi
+ check_hotplug_net
+ check_inotify
+ use acpi && check_procfs
fi
if [[ -d ${ROOT}/etc/hal/device.d ]]; then
diff --git a/sys-apps/hal/hal-0.5.9.1-r2.ebuild b/sys-apps/hal/hal-0.5.9.1-r2.ebuild
index 9942a071e23a..141a3c7398e5 100644
--- a/sys-apps/hal/hal-0.5.9.1-r2.ebuild
+++ b/sys-apps/hal/hal-0.5.9.1-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r2.ebuild,v 1.3 2007/11/23 06:43:51 compnerd Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r2.ebuild,v 1.4 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info autotools flag-o-matic
@@ -51,56 +51,44 @@ PDEPEND="app-misc/hal-info"
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_procfs() {
- ewarn
- ewarn "You must enable the proc filesystem in your kernel."
- ewarn "For this you need to enable '/proc file system support' under"
- ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
- ewarn "CONFIG_PROC_FS in the config file."
- ewarn
- ebeep 5
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_inotify() {
- ewarn
- ewarn "You must enable the Inotify system in your kernel."
- ewarn "For this you need to enable 'Inotify support for userspace'"
- ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
- ewarn
- ebeep 5
+function check_procfs() {
+ local CONFIG_CHECK="~PROC_FS"
+ local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if ! built_with_use --missing false sys-apps/pciutils hal ; then
+ if ! built_with_use --missing true sys-apps/pciutils hal ; then
if built_with_use --missing false sys-apps/pciutils zlib ; then
- eerror "You MUST build sys-apps/pciutils without the zlib USE flag"
die "You MUST build sys-apps/pciutils without the zlib USE flag"
fi
fi
- if use kernel_linux; then
- kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
-
- if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
- then
- notify_uevent
+ if use kernel_linux ; then
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ kernel_is ge 2 6 17 || \
+ ewarn "HAL requires a kernel version 2.6.17 or newer"
fi
- linux_chkconfig_present INOTIFY_USER || notify_inotify
-
- if use acpi ; then
- linux_chkconfig_present PROC_FS || notify_procfs
- fi
+ check_hotplug_net
+ check_inotify
+ use acpi && check_procfs
fi
if [[ -d ${ROOT}/etc/hal/device.d ]]; then
diff --git a/sys-apps/hal/hal-0.5.9.1-r3.ebuild b/sys-apps/hal/hal-0.5.9.1-r3.ebuild
index edf076cf6754..47adff017bd9 100644
--- a/sys-apps/hal/hal-0.5.9.1-r3.ebuild
+++ b/sys-apps/hal/hal-0.5.9.1-r3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r3.ebuild,v 1.7 2007/12/11 19:59:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9.1-r3.ebuild,v 1.8 2008/02/08 20:11:00 wolf31o2 Exp $
inherit eutils linux-info autotools flag-o-matic
@@ -51,49 +51,44 @@ PDEPEND="app-misc/hal-info"
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
-function notify_uevent() {
- ewarn
- ewarn "You must enable Kernel Userspace Events in your kernel."
- ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
- ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
- ewarn "in the config file."
- ewarn
- ebeep 5
+function check_hotplug_net() {
+ local CONFIG_CHECK="~HOTPLUG ~NET"
+ local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
+ local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_procfs() {
- ewarn
- ewarn "You must enable the proc filesystem in your kernel."
- ewarn "For this you need to enable '/proc file system support' under"
- ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
- ewarn "CONFIG_PROC_FS in the config file."
- ewarn
- ebeep 5
+function check_inotify() {
+ local CONFIG_CHECK="~INOTIFY_USER"
+ local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
-function notify_inotify() {
- ewarn
- ewarn "You must enable the Inotify system in your kernel."
- ewarn "For this you need to enable 'Inotify support for userspace'"
- ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
- ewarn
- ebeep 5
+function check_procfs() {
+ local CONFIG_CHECK="~PROC_FS"
+ local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)"
+ check_extra_config
+ echo
}
pkg_setup() {
- if use kernel_linux; then
- kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
-
- if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
- then
- notify_uevent
+ if ! built_with_use --missing true sys-apps/pciutils hal ; then
+ if built_with_use --missing false sys-apps/pciutils zlib ; then
+ die "You MUST build sys-apps/pciutils without the zlib USE flag"
fi
+ fi
- linux_chkconfig_present INOTIFY_USER || notify_inotify
-
- if use acpi ; then
- linux_chkconfig_present PROC_FS || notify_procfs
+ if use kernel_linux ; then
+ if [ -e ${ROOT}/usr/src/linux/.config ] ; then
+ kernel_is ge 2 6 17 || \
+ ewarn "HAL requires a kernel version 2.6.17 or newer"
fi
+
+ check_hotplug_net
+ check_inotify
+ use acpi && check_procfs
fi
if [[ -d ${ROOT}/etc/hal/device.d ]]; then