summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-04-30 16:28:53 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-04-30 16:28:53 +0000
commit90653d08983dae499a5f888aee02be52a0729d24 (patch)
tree7040eb565cfb1e891894873bf4fade384a0f32ab /net-print/cups
parentSwitch to git-2 (diff)
downloadgentoo-2-90653d08983dae499a5f888aee02be52a0729d24.tar.gz
gentoo-2-90653d08983dae499a5f888aee02be52a0729d24.tar.bz2
gentoo-2-90653d08983dae499a5f888aee02be52a0729d24.zip
Add the kernel check so we really ensure nobody tries both libusb and usblp at once.
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'net-print/cups')
-rw-r--r--net-print/cups/ChangeLog6
-rw-r--r--net-print/cups/cups-1.4.6-r1.ebuild44
2 files changed, 45 insertions, 5 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog
index 35fb31a7afb8..29e4332826ec 100644
--- a/net-print/cups/ChangeLog
+++ b/net-print/cups/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-print/cups
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.409 2011/04/30 15:50:53 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.410 2011/04/30 16:28:53 scarabeus Exp $
+
+ 30 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> cups-1.4.6-r1.ebuild:
+ Add the kernel check so we really ensure nobody tries both libusb and usblp
+ at once.
30 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org> cups-1.4.6-r1.ebuild:
Add new shiny elog message about what usb useflag does on cups.
diff --git a/net-print/cups/cups-1.4.6-r1.ebuild b/net-print/cups/cups-1.4.6-r1.ebuild
index 3a01fecac953..0d25a56232cc 100644
--- a/net-print/cups/cups-1.4.6-r1.ebuild
+++ b/net-print/cups/cups-1.4.6-r1.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.6-r1.ebuild,v 1.2 2011/04/30 15:50:53 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.6-r1.ebuild,v 1.3 2011/04/30 16:28:53 scarabeus Exp $
EAPI=3
PYTHON_DEPEND="python? 2:2.5"
-inherit autotools eutils flag-o-matic multilib pam perl-module python versionator java-pkg-opt-2
+inherit autotools eutils flag-o-matic linux-mod multilib pam perl-module python versionator java-pkg-opt-2
MY_P=${P/_}
@@ -80,6 +80,41 @@ pkg_setup() {
python_set_active_version 2
python_pkg_setup
fi
+
+ linux-mod_pkg_setup
+ if ! linux_config_exists; then
+ ewarn "Can't check the linux kernel configuration."
+ ewarn "You might have some incompatible options enabled."
+ else
+ # recheck that we don't have usblp to collide with libusb
+ if use usb; then
+ if linux_chkconfig_present USB_PRINTER; then
+ eerror "Your usb printers will be managed via libusb."
+ eerror "Note that this interface still has issues so alternatively"
+ eerror "you should just disable usb useflag on ${P}."
+ eerror "${P} requires the USB_PRINTER support disabled."
+ eerror "Please disable it:"
+ eerror " CONFIG_USB_PRINTER=n"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " USB support --->"
+ eerror " [ ] USB Printer support"
+ die "USB_PRINTER module enabled"
+ fi
+ else
+ #here we should warn user that he should enable it so he can print
+ if ! linux_chkconfig_present USB_PRINTER; then
+ ewarn "If you plan to use USB printers you should enable the USB_PRINTER"
+ ewarn "support in your kernel."
+ ewarn "Please enable it:"
+ ewarn " CONFIG_USB_PRINTER=y"
+ ewarn "in /usr/src/linux/.config or"
+ ewarn " Device Drivers --->"
+ ewarn " USB support --->"
+ ewarn " [*] USB Printer support"
+ fi
+ fi
+ fi
}
src_prepare() {
@@ -240,12 +275,13 @@ pkg_postinst() {
echo
if use usb; then
+ elog
elog "You are going to use new libusb backed to access your usb printer."
elog "This interface has quite few known issues and does not report all"
elog "issues and just refuses to print."
elog "Please consider disabling usb useflag if you are having issues."
elog
- elog "Please note that that if you disable the usb useflag your device will"
- elog "be still working using old kernel usblp interface instead of libusb."
+ elog "Please note that if you disable the usb useflag your device will be"
+ elog "still working using kernel usblp interface instead of libusb."
fi
}