diff options
author | Paul Varner <fuzzyray@gentoo.org> | 2012-04-16 19:56:55 +0000 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2012-04-16 19:56:55 +0000 |
commit | ec725fc5219dbca4893f5521ff47e3af22655fdc (patch) | |
tree | a3e46d3216478ba5f238cc776c940de7ccef9b39 /app-portage | |
parent | Marking libchipcard-5.0.2 ppc for bug 398007 (diff) | |
download | gentoo-2-ec725fc5219dbca4893f5521ff47e3af22655fdc.tar.gz gentoo-2-ec725fc5219dbca4893f5521ff47e3af22655fdc.tar.bz2 gentoo-2-ec725fc5219dbca4893f5521ff47e3af22655fdc.zip |
Revision bump to add patch for printing Layman API sync warnings.
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/esearch/ChangeLog | 9 | ||||
-rw-r--r-- | app-portage/esearch/esearch-1.1-r1.ebuild | 59 | ||||
-rw-r--r-- | app-portage/esearch/files/1.1-Reprint-warnings-detected-during-layman-sync-API.patch | 100 |
3 files changed, 167 insertions, 1 deletions
diff --git a/app-portage/esearch/ChangeLog b/app-portage/esearch/ChangeLog index 085f6e2cf559..ef6fe13508ef 100644 --- a/app-portage/esearch/ChangeLog +++ b/app-portage/esearch/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-portage/esearch # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.85 2012/04/13 21:49:41 fuzzyray Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.86 2012/04/16 19:56:55 fuzzyray Exp $ + +*esearch-1.1-r1 (16 Apr 2012) + + 16 Apr 2012; Paul Varner <fuzzyray@gentoo.org> + +files/1.1-Reprint-warnings-detected-during-layman-sync-API.patch, + +esearch-1.1-r1.ebuild: + Revision bump to add patch for printing Layman API sync warnings. *esearch-1.1 (13 Apr 2012) diff --git a/app-portage/esearch/esearch-1.1-r1.ebuild b/app-portage/esearch/esearch-1.1-r1.ebuild new file mode 100644 index 000000000000..d08ec5c8e2fb --- /dev/null +++ b/app-portage/esearch/esearch-1.1-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/esearch-1.1-r1.ebuild,v 1.1 2012/04/16 19:56:55 fuzzyray Exp $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="2.[45] 2.7-pypy-* *-jython" +PYTHON_USE_WITH="readline" +PYTHON_NONVERSIONED_EXECUTABLES=(".*") + +inherit base distutils python + +DESCRIPTION="Replacement for 'emerge --search' with search-index" +HOMEPAGE="http://david-peter.de/esearch.html" +SRC_URI="mirror://github/fuzzyray/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="linguas_fr linguas_it" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" + +DEPEND="sys-apps/portage" +RDEPEND="${DEPEND}" + +# Populate the patches array for any patches for -rX releases +# It is an array of patch file names of the form: +# "${FILESDIR}"/${PV}-fix-EPREFIX-capability.patch +PATCHES=( "${FILESDIR}"/${PV}-Reprint-warnings-detected-during-layman-sync-API.patch ) + +distutils_src_compile_pre_hook() { + echo VERSION="${PVR}" "$(PYTHON)" setup.py set_version + VERSION="${PVR}" "$(PYTHON)" setup.py set_version \ + || die "setup.py set_version failed" +} + +src_prepare() { + base_src_prepare + distutils_src_prepare +} + +src_compile() { + distutils_src_compile +} + +src_install() { + python_convert_shebangs -r "" build-*/scripts-* + distutils_src_install + dodoc eupdatedb.cron || die "dodoc failed" + + # Remove unused man pages according to the linguas flags + if ! use linguas_fr ; then + rm -rf "${ED}"/usr/share/man/fr + fi + + if ! use linguas_it ; then + rm -rf "${ED}"/usr/share/man/it + fi +} diff --git a/app-portage/esearch/files/1.1-Reprint-warnings-detected-during-layman-sync-API.patch b/app-portage/esearch/files/1.1-Reprint-warnings-detected-during-layman-sync-API.patch new file mode 100644 index 000000000000..2c202100a688 --- /dev/null +++ b/app-portage/esearch/files/1.1-Reprint-warnings-detected-during-layman-sync-API.patch @@ -0,0 +1,100 @@ +From 32797b3ac5992c1711f9d965a967d00cbe014c78 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec <dolsen@gentoo.org> +Date: Sun, 15 Apr 2012 16:12:51 -0700 +Subject: [PATCH] Reprint warnings detected during layman sync API operations + at the end of the sync output. + +--- + esearch/common.py | 8 +++++++- + esearch/sync.py | 17 ++++++++++++----- + 2 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/esearch/common.py b/esearch/common.py +index c092026..a97102f 100755 +--- a/esearch/common.py ++++ b/esearch/common.py +@@ -10,7 +10,7 @@ from __future__ import print_function + + import sys + from portage import catpkgsplit +-from portage.output import red, green ++from portage.output import red, green, yellow + + from . import __version__ + +@@ -101,3 +101,9 @@ def error(msg, fatal=True, stderr=CONFIG['stderr']): + print('', file=stderr) + if fatal: + sys.exit(1) ++ ++def warn(msg, fatal=False, stdout=CONFIG['stdout']): ++ print(yellow(" * Warning:"), msg, file=stdout) ++ print('', file=stdout) ++ if fatal: ++ sys.exit(1) +diff --git a/esearch/sync.py b/esearch/sync.py +index a05f1cf..5748698 100755 +--- a/esearch/sync.py ++++ b/esearch/sync.py +@@ -29,7 +29,7 @@ except ImportError: + + from esearch.common import (CONFIG, SyncOpts, error, outofdateerror, + logfile_sync, laymanlog_sync, tmp_path, tmp_prefix, version, +- EPREFIX, COMPACT) ++ EPREFIX, COMPACT, warn) + from esearch.update import updatedb + from esearch.search import searchdb + +@@ -166,8 +166,8 @@ def layman_sync(config): + error("'" + config['layman-cmd'] + "' failed, see " + + laymanlog_sync + " for errors", fatal=False) + print("") +- return False +- return True ++ return False, [] ++ return True, [] + # run the api to sync + emsg("Running the Layman API", config) + if config['verbose']<1: +@@ -179,6 +179,7 @@ def layman_sync(config): + verbose=config['verbose']>0, nocolor=config['nocolor']) + repos = _layman.get_installed() + success = _layman.sync(repos, output_results=config['verbose']>0) ++ warnings = _layman.sync_results[1] + if not success: + error("Syncing with the layman api "\ + "failed.\n Failures were:", fatal=False) +@@ -186,7 +187,7 @@ def layman_sync(config): + for ovl, result in fatals: + error(result, fatal=False) + +- return success ++ return success, warnings + + + def sync(config): +@@ -194,7 +195,8 @@ def sync(config): + tree_old = gettree("old", config) + + if config['layman-sync']: +- if not layman_sync(config): ++ success, warnings = layman_sync(config) ++ if not success: + return False + + if config['verbose'] >= 0: +@@ -266,6 +268,11 @@ def sync(config): + emsg("No updates found", config) + success = True + ++ if warnings: ++ print("", file=config['stdout']) ++ for ovl, result in warnings: ++ warn(result) ++ + # multiple pkgname search method + # build our re search list + #pkg_patterns = [] +-- +1.7.8.5 + |