summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2010-03-15 22:41:07 +0000
committerSebastian Pipping <sping@gentoo.org>2010-03-15 22:41:07 +0000
commitfabbea461fb18ae6fb35c6e78dd73e6c0e534876 (patch)
tree53618072394742f3006c315a24426baeb184c343 /app-portage
parentx11-libs/libXScrnSaver: dep on the proto in RDEPEND too, fixes bug #303311, s... (diff)
downloadgentoo-2-fabbea461fb18ae6fb35c6e78dd73e6c0e534876.tar.gz
gentoo-2-fabbea461fb18ae6fb35c6e78dd73e6c0e534876.tar.bz2
gentoo-2-fabbea461fb18ae6fb35c6e78dd73e6c0e534876.zip
app-portage/layman: Integrate backport patch for bug #309617
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/layman/ChangeLog8
-rw-r--r--app-portage/layman/files/layman-1.3.2-missing-text.patch95
-rw-r--r--app-portage/layman/layman-1.3.2-r2.ebuild104
3 files changed, 206 insertions, 1 deletions
diff --git a/app-portage/layman/ChangeLog b/app-portage/layman/ChangeLog
index 55f5df3f214a..acec3d239b95 100644
--- a/app-portage/layman/ChangeLog
+++ b/app-portage/layman/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-portage/layman
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/ChangeLog,v 1.104 2010/03/14 12:41:16 kolmodin Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/ChangeLog,v 1.105 2010/03/15 22:41:07 sping Exp $
+
+*layman-1.3.2-r2 (15 Mar 2010)
+
+ 15 Mar 2010; Sebastian Pipping <sping@gentoo.org> +layman-1.3.2-r2.ebuild,
+ +files/layman-1.3.2-missing-text.patch:
+ Integrate backport patch for bug #309617
14 Mar 2010; Lennart Kolmodin <kolmodin@gentoo.org>
layman-1.3.0-r1.ebuild, layman-1.3.1.ebuild, layman-1.3.2-r1.ebuild,
diff --git a/app-portage/layman/files/layman-1.3.2-missing-text.patch b/app-portage/layman/files/layman-1.3.2-missing-text.patch
new file mode 100644
index 000000000000..1272347e8500
--- /dev/null
+++ b/app-portage/layman/files/layman-1.3.2-missing-text.patch
@@ -0,0 +1,95 @@
+From b3d326a19454ddd00b9f5fc8400f926123bd13db Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Mon, 15 Mar 2010 23:21:22 +0100
+Subject: [PATCH 1/2] Fix handling of empty XML entities (bug #309617)
+
+---
+ layman/overlays/overlay.py | 22 ++++++++++++++--------
+ layman/version.py | 2 +-
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
+index d2144f1..2333d72 100644
+--- a/layman/overlays/overlay.py
++++ b/layman/overlays/overlay.py
+@@ -100,9 +100,15 @@ class Overlay(object):
+ False
+ '''
+
++ def strip_text(node):
++ res = node.text
++ if res is None:
++ return ''
++ return res.strip()
++
+ _name = xml.find('name')
+ if _name != None:
+- self.name = ensure_unicode(_name.text.strip())
++ self.name = ensure_unicode(strip_text(_name))
+ elif 'name' in xml.attrib:
+ self.name = ensure_unicode(xml.attrib['name'])
+ else:
+@@ -127,7 +133,7 @@ class Overlay(object):
+ _class = OVERLAY_TYPES[_type]
+ except KeyError:
+ raise Exception('Unknown overlay type "%s"!' % _type)
+- _location = ensure_unicode(source_elem.text.strip())
++ _location = ensure_unicode(strip_text(source_elem))
+ return _class(self, xml, config, _location, ignore, quiet)
+
+ self.sources = [create_overlay_source(e) for e in _sources]
+@@ -139,10 +145,10 @@ class Overlay(object):
+ else:
+ _email = _owner.find('email')
+ if _owner != None and _email != None:
+- self.owner_email = ensure_unicode(_email.text.strip())
++ self.owner_email = ensure_unicode(strip_text(_email))
+ _name = _owner.find('name')
+ if _name != None:
+- self.owner_name = ensure_unicode(_name.text.strip())
++ self.owner_name = ensure_unicode(strip_text(_name))
+ else:
+ self.owner_name = None
+ elif 'contact' in xml.attrib:
+@@ -161,7 +167,7 @@ class Overlay(object):
+
+ _desc = xml.find('description')
+ if _desc != None:
+- d = WHITESPACE_REGEX.sub(' ', _desc.text.strip())
++ d = WHITESPACE_REGEX.sub(' ', strip_text(_desc))
+ self.description = ensure_unicode(d)
+ del d
+ else:
+@@ -191,13 +197,13 @@ class Overlay(object):
+ h = xml.find('homepage')
+ l = xml.find('link')
+ if h != None:
+- self.homepage = ensure_unicode(h.text.strip())
++ self.homepage = ensure_unicode(strip_text(h))
+ elif l != None:
+- self.homepage = ensure_unicode(l.text.strip())
++ self.homepage = ensure_unicode(strip_text(l))
+ else:
+ self.homepage = None
+
+- self.feeds = [ensure_unicode(e.text.strip()) for e in xml.findall('feed')]
++ self.feeds = [ensure_unicode(strip_text(e)) for e in xml.findall('feed')]
+
+
+ def __eq__(self, other):
+diff --git a/layman/version.py b/layman/version.py
+index c42c7f9..1cb47d4 100644
+--- a/layman/version.py
++++ b/layman/version.py
+@@ -20,7 +20,7 @@
+ __version__ = "$Id: layman-1.3.2-missing-text.patch,v 1.1 2010/03/15 22:41:07 sping Exp $"
+
+
+-VERSION = '1.3.2_p1'
++VERSION = '1.3.2_p2'
+
+ if __name__ == '__main__':
+ print VERSION
+--
+1.7.0.1.61.gdc05d.dirty
+
diff --git a/app-portage/layman/layman-1.3.2-r2.ebuild b/app-portage/layman/layman-1.3.2-r2.ebuild
new file mode 100644
index 000000000000..7f9b3a9a97e6
--- /dev/null
+++ b/app-portage/layman/layman-1.3.2-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/layman-1.3.2-r2.ebuild,v 1.1 2010/03/15 22:41:07 sping Exp $
+
+EAPI="2"
+NEED_PYTHON=2.5
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils distutils
+
+DESCRIPTION="A python script for retrieving gentoo overlays."
+HOMEPAGE="http://layman.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="bazaar cvs darcs git mercurial subversion test"
+
+COMMON_DEPS="dev-lang/python[xml]"
+DEPEND="${COMMON_DEPS}
+ test? ( dev-util/subversion )"
+RDEPEND="${COMMON_DEPS}
+ bazaar? ( dev-vcs/bzr )
+ cvs? ( dev-util/cvs )
+ darcs? ( dev-vcs/darcs )
+ git? ( dev-util/git )
+ mercurial? ( dev-vcs/mercurial )
+ subversion? (
+ || (
+ >=dev-util/subversion-1.5.4[webdav-neon]
+ >=dev-util/subversion-1.5.4[webdav-serf]
+ )
+ )"
+RESTRICT_PYTHON_ABIS="2.4 3.*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-missing-import.patch
+ epatch "${FILESDIR}"/${P}-missing-text.patch
+}
+
+pkg_setup() {
+ if ! has_version dev-util/subversion; then
+ ewarn "You do not have dev-util/subversion installed!"
+ ewarn "While layman does not exactly depend on this"
+ ewarn "version control system you should note that"
+ ewarn "most available overlays are offered via"
+ ewarn "dev-util/subversion. If you do not install it"
+ ewarn "you will be unable to use these overlays."
+ ewarn
+ fi
+}
+
+src_test() {
+ testing() {
+ for suite in layman/tests/{dtest,external}.py ; do
+ PYTHONPATH="." "$(PYTHON)" ${suite} \
+ || die "test suite '${suite}' failed"
+ done
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ distutils_src_install
+
+ dodir /etc/layman
+
+ cp etc/* "${D}"/etc/layman/
+
+ doman doc/layman.8
+ dohtml doc/layman.8.html
+
+ keepdir /var/lib/layman
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ einfo "You are now ready to add overlays into your system."
+ einfo
+ einfo " layman -L"
+ einfo
+ einfo "will display a list of available overlays."
+ einfo
+ elog "Select an overlay and add it using"
+ elog
+ elog " layman -a overlay-name"
+ elog
+ elog "If this is the very first overlay you add with layman,"
+ elog "you need to append the following statement to your"
+ elog "/etc/make.conf file:"
+ elog
+ elog " source /var/lib/layman/make.conf"
+ elog
+ elog "If you modify the 'storage' parameter in the layman"
+ elog "configuration file (/etc/layman/layman.cfg) you will"
+ elog "need to adapt the path given above to the new storage"
+ elog "directory."
+ elog
+ ewarn "Please add the 'source' statement to make.conf only AFTER "
+ ewarn "you added your first overlay. Otherwise portage will fail."
+ epause 5
+}