diff options
author | Sebastian Pipping <sping@gentoo.org> | 2010-01-16 17:31:35 +0000 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2010-01-16 17:31:35 +0000 |
commit | 58d74f9d2c2c43441dcfd652d59a9f9b7464205f (patch) | |
tree | 7aac94dccddc6f477eb7f70166121c4dfe289008 /app-portage | |
parent | stable x86, bug 293714 (diff) | |
download | gentoo-2-58d74f9d2c2c43441dcfd652d59a9f9b7464205f.tar.gz gentoo-2-58d74f9d2c2c43441dcfd652d59a9f9b7464205f.tar.bz2 gentoo-2-58d74f9d2c2c43441dcfd652d59a9f9b7464205f.zip |
app-portage/layman: Integrate patch to bug #301174 for 1.3.0_rc1-r1
(Portage version: 2.2_rc61/cvs/Linux i686)
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/layman/ChangeLog | 8 | ||||
-rw-r--r-- | app-portage/layman/files/layman-1.3.0_rc1-sync-fix.patch | 105 | ||||
-rw-r--r-- | app-portage/layman/layman-1.3.0_rc1-r1.ebuild | 99 |
3 files changed, 211 insertions, 1 deletions
diff --git a/app-portage/layman/ChangeLog b/app-portage/layman/ChangeLog index b4189d44a443..f81ce5cd120e 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.89 2010/01/15 18:23:52 sping Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/ChangeLog,v 1.90 2010/01/16 17:31:35 sping Exp $ + +*layman-1.3.0_rc1-r1 (16 Jan 2010) + + 16 Jan 2010; Sebastian Pipping <sping@gentoo.org> + +layman-1.3.0_rc1-r1.ebuild, +files/layman-1.3.0_rc1-sync-fix.patch: + Integrate patch to bug #301174 for 1.3.0_rc1-r1 *layman-1.3.0_rc1 (15 Jan 2010) diff --git a/app-portage/layman/files/layman-1.3.0_rc1-sync-fix.patch b/app-portage/layman/files/layman-1.3.0_rc1-sync-fix.patch new file mode 100644 index 000000000000..487975ee967f --- /dev/null +++ b/app-portage/layman/files/layman-1.3.0_rc1-sync-fix.patch @@ -0,0 +1,105 @@ +From 6c7d833b16fbe0c4d39af665e76fa47811edcad2 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sat, 16 Jan 2010 18:21:25 +0100 +Subject: [PATCH] Fix syncing of overlays gone from remote lists + +--- + CHANGES | 7 +++++++ + layman/action.py | 46 +++++++++++++++++++++++++++++++++++----------- + layman/overlay.py | 5 +++-- + 3 files changed, 45 insertions(+), 13 deletions(-) + +diff --git a/CHANGES b/CHANGES +index 51ab56f..5ef7dd0 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -1,6 +1,13 @@ + CHANGES + ------- + ++Version TODO ++======================================= ++ ++ - Syncing failed for overlays that no longer exist in the remote ++ lists with no need to (bug #301174) ++ ++ + Version 1.3.0_rc1 - Released 2010/01/15 + ======================================= + +diff --git a/layman/action.py b/layman/action.py +index 2701030..02ba1ce 100644 +--- a/layman/action.py ++++ b/layman/action.py +@@ -111,17 +111,41 @@ class Sync: + warnings = [] + success = [] + for i in self.selection: +- ordb = self.rdb.select(i) +- odb = self.db.select(i) +- current_src = odb.sources[0].src +- available_srcs = set(e.src for e in ordb.sources) +- if ordb and odb and not current_src in available_srcs: +- warnings.append( +- 'The source of the overlay "' + i + '" seems to have c' +- 'hanged. You currently sync from "' + current_src + '" whi' +- 'le the global layman list reports "' + '" and "'.join(available_srcs) + '" ' +- 'as correct location(s). Please consider removing and rea' +- 'dding the overlay!') ++ try: ++ ordb = self.rdb.select(i) ++ except: ++ warnings.append(\ ++ 'Overlay "%s" could not be found in the remote lists.\n' ++ 'Please check if it has been renamed and re-add if necessary.' % i) ++ else: ++ odb = self.db.select(i) ++ current_src = odb.sources[0].src ++ available_srcs = set(e.src for e in ordb.sources) ++ if ordb and odb and not current_src in available_srcs: ++ if len(available_srcs) == 1: ++ plural = '' ++ candidates = ' %s' % tuple(available_srcs)[0] ++ else: ++ plural = 's' ++ candidates = '\n'.join((' %d. %s' % (i + 1, v)) for i, v in enumerate(available_srcs)) ++ ++ warnings.append( ++ 'The source of the overlay "%(repo_name)s" seems to have changed.\n' ++ 'You currently sync from\n' ++ '\n' ++ ' %(current_src)s\n' ++ '\n' ++ 'while the remote lists report\n' ++ '\n' ++ '%(candidates)s\n' ++ '\n' ++ 'as correct location%(plural)s.\n' ++ 'Please consider removing and re-adding the overlay.' % { ++ 'repo_name':i, ++ 'current_src':current_src, ++ 'candidates':candidates, ++ 'plural':plural, ++ }) + + try: + self.db.sync(i, self.quiet) +diff --git a/layman/overlay.py b/layman/overlay.py +index 0ea11f0..1058723 100644 +--- a/layman/overlay.py ++++ b/layman/overlay.py +@@ -149,8 +149,9 @@ class Overlays: + >>> list(a.select('wrobel-stable').source_uris()) + [u'rsync://gunnarwrobel.de/wrobel-stable'] + ''' +- if overlay in self.overlays.keys(): +- return self.overlays[overlay] ++ if not overlay in self.overlays.keys(): ++ raise Exception('No overlay "%s" in database' % overlay) ++ return self.overlays[overlay] + + def list(self, verbose = False, width = 0): + ''' +-- +1.6.6 + diff --git a/app-portage/layman/layman-1.3.0_rc1-r1.ebuild b/app-portage/layman/layman-1.3.0_rc1-r1.ebuild new file mode 100644 index 000000000000..fcbc9faa2fac --- /dev/null +++ b/app-portage/layman/layman-1.3.0_rc1-r1.ebuild @@ -0,0 +1,99 @@ +# 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.0_rc1-r1.ebuild,v 1.1 2010/01/16 17:31:35 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="git subversion test" + +COMMON_DEPS="dev-lang/python[xml]" +DEPEND="${COMMON_DEPS} + test? ( dev-util/subversion )" +RDEPEND="${COMMON_DEPS} + git? ( dev-util/git ) + subversion? ( + || ( + >=dev-util/subversion-1.5.4[webdav-neon] + >=dev-util/subversion-1.5.4[webdav-serf] + ) + )" +RESTRICT_PYTHON_ABIS="2.4 3.*" + +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_prepare() { + epatch "${FILESDIR}"/${P}-sync-fix.patch +} + +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 /usr/local/portage/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" + einfo + elog "layman -a overlay-name" + einfo + 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 /usr/local/portage/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." + einfo + ewarn "Please add the 'source' statement to make.conf only AFTER " + ewarn "you added your first overlay. Otherwise portage will fail." + epause 5 +} |