summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Dupeyron <calchan@gentoo.org>2007-10-18 13:08:22 +0000
committerDenis Dupeyron <calchan@gentoo.org>2007-10-18 13:08:22 +0000
commit1350a8d0ffb3ba5b93396f57d97221f2fc2ca9bc (patch)
tree15ecb939636f68aa30c0e59dadc2104efbdfe7fe /net-print/hplip
parentStable on ppc, bug #179927. (diff)
downloadgentoo-2-1350a8d0ffb3ba5b93396f57d97221f2fc2ca9bc.tar.gz
gentoo-2-1350a8d0ffb3ba5b93396f57d97221f2fc2ca9bc.tar.bz2
gentoo-2-1350a8d0ffb3ba5b93396f57d97221f2fc2ca9bc.zip
Fixed bug #195565 for new 2.x branch. Fixed quoting.
(Portage version: 2.1.3.14)
Diffstat (limited to 'net-print/hplip')
-rw-r--r--net-print/hplip/ChangeLog10
-rw-r--r--net-print/hplip/files/digest-hplip-2.7.7-r33
-rw-r--r--net-print/hplip/files/digest-hplip-2.7.9-r1 (renamed from net-print/hplip/files/digest-hplip-2.7.9)0
-rw-r--r--net-print/hplip/files/hplip-2.7.7-udev-kernel.2.6.22.diff12
-rw-r--r--net-print/hplip/files/hplip-2.7.9-subprocess_replacement.patch99
-rw-r--r--net-print/hplip/hplip-2.7.7-r3.ebuild115
-rw-r--r--net-print/hplip/hplip-2.7.9-r1.ebuild (renamed from net-print/hplip/hplip-2.7.9.ebuild)13
7 files changed, 116 insertions, 136 deletions
diff --git a/net-print/hplip/ChangeLog b/net-print/hplip/ChangeLog
index f0669958393d..377f50f47ee5 100644
--- a/net-print/hplip/ChangeLog
+++ b/net-print/hplip/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-print/hplip
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.78 2007/10/10 18:19:47 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/ChangeLog,v 1.79 2007/10/18 13:08:21 calchan Exp $
+
+*hplip-2.7.9-r1 (18 Oct 2007)
+
+ 18 Oct 2007; Denis Dupeyron <calchan@gentoo.org>
+ -files/hplip-2.7.7-udev-kernel.2.6.22.diff,
+ +files/hplip-2.7.9-subprocess_replacement.patch, -hplip-2.7.7-r3.ebuild,
+ -hplip-2.7.9.ebuild, +hplip-2.7.9-r1.ebuild:
+ Fixed bug #195565 for new 2.x branch. Fixed quoting.
10 Oct 2007; Stefan Schweizer <genstef@gentoo.org> hplip-2.7.9.ebuild:
Improve DEPEND-accuracy for jakub in bug 193671
diff --git a/net-print/hplip/files/digest-hplip-2.7.7-r3 b/net-print/hplip/files/digest-hplip-2.7.7-r3
deleted file mode 100644
index 3dbaf8aeb6e1..000000000000
--- a/net-print/hplip/files/digest-hplip-2.7.7-r3
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 086bd6a306fa2dfbd6e8c962fddcdef4 hplip-2.7.7.tar.gz 14412854
-RMD160 d3bc36b44b2fd07d8938fce2f508bbc9b4c47b5b hplip-2.7.7.tar.gz 14412854
-SHA256 0804bda4dd18480597bf408351fe56412b84f737d2554b07aafaa1fb089674ba hplip-2.7.7.tar.gz 14412854
diff --git a/net-print/hplip/files/digest-hplip-2.7.9 b/net-print/hplip/files/digest-hplip-2.7.9-r1
index 46ad4669e85f..46ad4669e85f 100644
--- a/net-print/hplip/files/digest-hplip-2.7.9
+++ b/net-print/hplip/files/digest-hplip-2.7.9-r1
diff --git a/net-print/hplip/files/hplip-2.7.7-udev-kernel.2.6.22.diff b/net-print/hplip/files/hplip-2.7.7-udev-kernel.2.6.22.diff
deleted file mode 100644
index 7dd55c1c7466..000000000000
--- a/net-print/hplip/files/hplip-2.7.7-udev-kernel.2.6.22.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: hplip-2.7.7/55-hpmud.rules
-===================================================================
---- hplip-2.7.7.orig/55-hpmud.rules
-+++ hplip-2.7.7/55-hpmud.rules
-@@ -1,5 +1,5 @@
- # TODO: add PROGRAM rule for 7/xx/xx printer class interface
--SUBSYSTEM!="usb_device", GOTO="hpmud_rules_end"
-+SUBSYSTEM!="usb|usb_device", GOTO="hpmud_rules_end"
- ACTION!="add", GOTO="hpmud_rules_end"
--SYSFS{idVendor}=="03f0", GROUP="lp"
-+ATTRS{idVendor}=="03f0", GROUP="lp"
- LABEL="hpmud_rules_end"
diff --git a/net-print/hplip/files/hplip-2.7.9-subprocess_replacement.patch b/net-print/hplip/files/hplip-2.7.9-subprocess_replacement.patch
new file mode 100644
index 000000000000..15b386e227f5
--- /dev/null
+++ b/net-print/hplip/files/hplip-2.7.9-subprocess_replacement.patch
@@ -0,0 +1,99 @@
+diff -urNad hplip-2.7.7.dfsg.1~/hpssd.py hplip-2.7.7.dfsg.1/hpssd.py
+--- hplip-2.7.7.dfsg.1~/hpssd.py 2007-10-04 12:45:29.000000000 -0700
++++ hplip-2.7.7.dfsg.1/hpssd.py 2007-10-04 12:46:39.000000000 -0700
+@@ -53,7 +53,7 @@
+
+ # Std Lib
+ import sys, socket, os, os.path, signal, getopt, time, select
+-import popen2, threading, tempfile
++import subprocess, threading, tempfile
+
+ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
+ ENOTCONN, ESHUTDOWN, EINTR, EISCONN
+@@ -560,21 +560,23 @@
+
+ if sendmail:
+ sendmail = os.path.join(sendmail, 'sendmail')
+- sendmail += ' -t -r %s' % self.from_address
++ cmd = [sendmail,'-t','-r',self.from_address]
+
+- log.debug(sendmail)
+- std_out, std_in, std_err = popen2.popen3(sendmail)
+- log.debug(repr(self.message))
+- std_in.write(self.message)
+- std_in.close()
++ log.debug(repr(cmd))
++ err = None
++ try:
++ sp = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++ std_out, std_err = sp.communicate(self.message)
++ log.debug(repr(self.message))
++ if std_err != '':
++ err = std_err
+
+- r, w, e = select.select([std_err], [], [], 2.0)
++ except OSError, e:
++ err = str(e)
+
+- if r:
+- err = std_err.read()
+- if err:
+- log.error(repr(err))
+- self.result = ERROR_TEST_EMAIL_FAILED
++ if err:
++ log.error(repr(err))
++ self.result = ERROR_TEST_EMAIL_FAILED
+
+ else:
+ log.error("Mail send failed. sendmail not found.")
+diff -urNad hplip-2.7.7.dfsg.1~/scan.py hplip-2.7.7.dfsg.1/scan.py
+--- hplip-2.7.7.dfsg.1~/scan.py 2007-10-04 12:45:14.000000000 -0700
++++ hplip-2.7.7.dfsg.1/scan.py 2007-10-04 12:46:48.000000000 -0700
+@@ -782,7 +782,7 @@
+ from scan import sane
+ import scanext
+ import cStringIO
+- import popen2
++ import subprocess
+
+ try:
+ import Image
+@@ -1139,26 +1139,21 @@
+
+ if sendmail:
+ sendmail = os.path.join(sendmail, 'sendmail')
+- sendmail += ' -t -r %s' % email_from
+-
+- log.debug(sendmail)
+- std_out, std_in, std_err = popen2.popen3(sendmail)
+- std_in.write(msg.as_string())
+- std_in.close()
+-
+- while True:
+- update_spinner()
+- r, w, e = select.select([std_err], [], [], 1.0)
+-
+- if r:
+- break
++ cmd = [sendmail,'-t','-r',email_from]
+
++ log.debug(repr(cmd))
++ err = None
++ try:
++ sp = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++ std_out, std_err = sp.communicate(msg.as_string())
++ if std_err != '':
++ err = std_err
++ except OSError, e:
++ err = str(e)
+ cleanup_spinner()
+
+- if r:
+- err = std_err.read()
+- if err:
+- log.error(repr(err))
++ if err:
++ log.error(repr(err))
+
+ else:
+ log.error("Mail send failed. 'sendmail' not found.")
diff --git a/net-print/hplip/hplip-2.7.7-r3.ebuild b/net-print/hplip/hplip-2.7.7-r3.ebuild
deleted file mode 100644
index f7c4465e2a7b..000000000000
--- a/net-print/hplip/hplip-2.7.7-r3.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.7.7-r3.ebuild,v 1.1 2007/09/29 20:31:08 calchan Exp $
-
-inherit eutils linux-info
-
-DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
-HOMEPAGE="http://hplip.sourceforge.net/"
-SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE="X doc fax minimal parport ppds scanner snmp"
-
-DEPEND="!net-print/hpijs
- !net-print/hpoj
- dev-libs/openssl
- virtual/ghostscript
- >=media-libs/jpeg-6b
- >=net-print/cups-1.2
- dev-libs/libusb
- >=dev-lang/python-2.2
- net-print/foomatic-filters
- fax? ( >=dev-lang/python-2.3 )
- snmp? ( net-analyzer/net-snmp )"
-
-RDEPEND="${DEPEND}
- !<sys-fs/udev-114
- fax? ( dev-python/reportlab )
- X? ( >=dev-python/PyQt-3.14 )
- scanner? (
- X? ( >=media-gfx/xsane-0.89 )
- !X? ( >=media-gfx/sane-frontends-1.0.9 )
- )"
-
-CONFIG_CHECK="PARPORT"
-ERROR_PARPORT="Please make sure Device Drivers -> Parallel port support is enabled in your kernel"
-
-pkg_setup() {
- use parport && linux-info_pkg_setup
-
- # avoid collisions with cups-1.2 compat symlinks
- if [ -e ${ROOT}/usr/lib/cups/backend/hp ] && [ -e ${ROOT}/usr/libexec/cups/backend/hp ]; then
- rm -f ${ROOT}/usr/libexec/cups/backend/hp{,fax};
- fi
-
- use ppds || ewarn "Not installing built-in PPD files. You need USE=ppds if you want to install them."
- use minimal && ewarn "Installing hpijs driver only, make sure you know what you are doing."
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
- sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
- -e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
- base/utils.py || die "Patching base/utils.py failed"
-
- # bug 98428
- sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" hpssd.py || die "Patching hpssd.py failed"
-
- # Force recognition of Gentoo distro by hp-check
- sed -i \
- -e "s:file('/etc/issue', 'r').read():'Gentoo':" \
- installer/core_install.py || die "sed core_install.py"
-
- # bug 186906, makes udev-rules work also for kernel-2.6.22
- epatch "${FILESDIR}/${P}-udev-kernel.2.6.22.diff"
-}
-
-src_compile() {
- econf \
- --disable-cups11-build \
- --with-cupsbackenddir=$(cups-config --serverbin)/backend \
- $(use_enable minimal hpijs-only-build) \
- $(use_enable doc doc-build) \
- $(use_enable snmp network-build) \
- $(use_enable parport pp-build) \
- $(use_enable scanner scan-build) \
- $(use_enable X gui-build) \
- $(use_enable fax fax-build) \
- $(use_enable ppds foomatic-ppd-install) \
- --disable-foomatic-xml-install \
- || die "econf failed"
- emake || die "Compilation failed"
-}
-
-src_install() {
- emake -j1 DESTDIR="${D}" install || die "emake install failed"
-
- # bug 106035
- use X || rm -Rf "${D}"/usr/share/applications
-}
-
-pkg_preinst() {
- if use scanner; then
- insinto /etc/sane.d
- [ -e /etc/sane.d/dll.conf ] && cp /etc/sane.d/dll.conf .
- [ -e ${ROOT}/etc/sane.d/dll.conf ] && cp ${ROOT}/etc/sane.d/dll.conf .
- grep -q hpaio dll.conf || echo hpaio >> dll.conf
- doins dll.conf
- fi
-}
-
-pkg_postinst() {
- elog "You should run hp-setup as root if you are installing hplip for the first time, and may also"
- elog "need to run it if you are upgrading from an earlier version."
- elog
- elog "If your device is connected using USB, users will need to be in the lp group to access it."
- elog
- elog "This release doesn't use an init script anymore, so you should probably do a"
- elog "'rc-update del hplip' if you are updating."
-}
diff --git a/net-print/hplip/hplip-2.7.9.ebuild b/net-print/hplip/hplip-2.7.9-r1.ebuild
index f4bdb22da6b3..631348e13627 100644
--- a/net-print/hplip/hplip-2.7.9.ebuild
+++ b/net-print/hplip/hplip-2.7.9-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.7.9.ebuild,v 1.3 2007/10/12 16:29:34 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.7.9-r1.ebuild,v 1.1 2007/10/18 13:08:21 calchan Exp $
-inherit linux-info
+inherit eutils linux-info
DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
HOMEPAGE="http://hplip.sourceforge.net/"
@@ -48,8 +48,8 @@ pkg_setup() {
fi
# avoid collisions with cups-1.2 compat symlinks
- if [ -e ${ROOT}/usr/lib/cups/backend/hp ] && [ -e ${ROOT}/usr/libexec/cups/backend/hp ]; then
- rm -f ${ROOT}/usr/libexec/cups/backend/hp{,fax};
+ if [ -e "${ROOT}"/usr/lib/cups/backend/hp ] && [ -e "${ROOT}"/usr/libexec/cups/backend/hp ]; then
+ rm -f "${ROOT}"/usr/libexec/cups/backend/hp{,fax};
fi
}
@@ -57,6 +57,9 @@ src_unpack() {
unpack ${A}
cd "${S}"
+ # Fix bug #195565
+ epatch "${FILESDIR}"/${P}-subprocess_replacement.patch
+
sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
@@ -105,7 +108,7 @@ pkg_preinst() {
if ! use minimal && use scanner ; then
insinto /etc/sane.d
[ -e /etc/sane.d/dll.conf ] && cp /etc/sane.d/dll.conf .
- [ -e ${ROOT}/etc/sane.d/dll.conf ] && cp ${ROOT}/etc/sane.d/dll.conf .
+ [ -e "${ROOT}"/etc/sane.d/dll.conf ] && cp "${ROOT}"/etc/sane.d/dll.conf .
grep -q hpaio dll.conf || echo hpaio >> dll.conf
doins dll.conf
fi