diff options
author | Paul Varner <fuzzyray@gentoo.org> | 2009-01-01 02:39:33 +0000 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2009-01-01 02:39:33 +0000 |
commit | d63efd2582d0c9595499b50f7094052826c67482 (patch) | |
tree | 905f6292fa62ea30bbd824206e2f278e0818e6e9 /app-portage | |
parent | Fixed parallel make issue, bug #246965. (diff) | |
download | gentoo-2-d63efd2582d0c9595499b50f7094052826c67482.tar.gz gentoo-2-d63efd2582d0c9595499b50f7094052826c67482.tar.bz2 gentoo-2-d63efd2582d0c9595499b50f7094052826c67482.zip |
Update ebuild to use the base eclass. Add patches for manifest2 support (Bug #146555) and add a --quiet option to esync (Bug #186994).
(Portage version: 2.2_rc20/cvs/Linux 2.6.23-gentoo-r8 i686)
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/esearch/ChangeLog | 15 | ||||
-rw-r--r-- | app-portage/esearch/esearch-0.7.1-r7.ebuild (renamed from app-portage/esearch/esearch-0.7.1-r5.ebuild) | 26 | ||||
-rw-r--r-- | app-portage/esearch/files/105234-fix-2.1-cache.patch | 11 | ||||
-rw-r--r-- | app-portage/esearch/files/124601-remove-deprecated-syntax.patch | 96 | ||||
-rw-r--r-- | app-portage/esearch/files/146555-esearch-manifest2.patch | 57 | ||||
-rw-r--r-- | app-portage/esearch/files/186994-esync-quiet.patch | 139 | ||||
-rw-r--r-- | app-portage/esearch/files/244450-deprecated.patch | 45 | ||||
-rw-r--r-- | app-portage/esearch/files/97462-esearch-metadata.patch | 21 |
8 files changed, 332 insertions, 78 deletions
diff --git a/app-portage/esearch/ChangeLog b/app-portage/esearch/ChangeLog index ac05f8d7e9c3..ac1388ba6aa4 100644 --- a/app-portage/esearch/ChangeLog +++ b/app-portage/esearch/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for app-portage/esearch -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.54 2008/12/31 05:11:19 fuzzyray Exp $ +# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/ChangeLog,v 1.55 2009/01/01 02:39:33 fuzzyray Exp $ + +*esearch-0.7.1-r7 (01 Jan 2009) + + 01 Jan 2009; Paul Varner <fuzzyray@gentoo.org> + +files/146555-esearch-manifest2.patch, +files/186994-esync-quiet.patch, + -files/105234-fix-2.1-cache.patch, + files/124601-remove-deprecated-syntax.patch, + -files/244450-deprecated.patch, files/97462-esearch-metadata.patch, + -esearch-0.7.1-r5.ebuild, +esearch-0.7.1-r7.ebuild: + Update ebuild to use the base eclass. Add patches for manifest2 support + (Bug #146555) and add a --quiet option to esync (Bug #186994). *esearch-0.7.1-r6 (31 Dec 2008) diff --git a/app-portage/esearch/esearch-0.7.1-r5.ebuild b/app-portage/esearch/esearch-0.7.1-r7.ebuild index 544bd94926e2..fe80dd9a9aad 100644 --- a/app-portage/esearch/esearch-0.7.1-r5.ebuild +++ b/app-portage/esearch/esearch-0.7.1-r7.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/esearch-0.7.1-r5.ebuild,v 1.1 2008/12/30 05:29:12 fuzzyray Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/esearch/esearch-0.7.1-r7.ebuild,v 1.1 2009/01/01 02:39:33 fuzzyray Exp $ -inherit eutils +inherit base eutils DESCRIPTION="Replacement for 'emerge --search' with search-index" HOMEPAGE="http://david-peter.de/esearch.html" @@ -16,6 +16,16 @@ IUSE="linguas_it" RDEPEND=">=dev-lang/python-2.2 >=sys-apps/portage-2.0.50" +PATCHES=( "${FILESDIR}"/97462-esearch-metadata.patch + "${FILESDIR}"/97969-ignore-missing-ebuilds.patch + "${FILESDIR}"/120817-unset-emergedefaultopts.patch + "${FILESDIR}"/124601-remove-deprecated-syntax.patch + "${FILESDIR}"/132548-multiple-overlay.patch + "${FILESDIR}"/231223-fix-deprecated.patch + "${FILESDIR}"/253216-fix-ebuild-option.patch + "${FILESDIR}"/186994-esync-quiet.patch + "${FILESDIR}"/146555-esearch-manifest2.patch ) + pkg_setup() { if ! built_with_use dev-lang/python readline ; then eerror "Python has to be build with 'readline' support!" @@ -26,15 +36,7 @@ pkg_setup() { fi } -src_compile() { - epatch "${FILESDIR}/97462-esearch-metadata.patch" || die "Failed to patch sources!" - epatch "${FILESDIR}/97969-ignore-missing-ebuilds.patch" || die "Failed to patch sources!" - epatch "${FILESDIR}/120817-unset-emergedefaultopts.patch" || die "Failed to patch sources!" - epatch "${FILESDIR}/132548-multiple-overlay.patch" || die "Failed to patch sources!" - epatch "${FILESDIR}/244450-deprecated.patch" || die "Failed to patch sources!" - echo "Fixing deprecated emerge syntax." - sed -i -e 's:/usr/bin/emerge sync:/usr/bin/emerge --sync:g' esync.py -} +src_compile() { :; } src_install() { dodir /usr/bin/ /usr/sbin/ || die "dodir failed" diff --git a/app-portage/esearch/files/105234-fix-2.1-cache.patch b/app-portage/esearch/files/105234-fix-2.1-cache.patch deleted file mode 100644 index 7dbe6bb9e1b5..000000000000 --- a/app-portage/esearch/files/105234-fix-2.1-cache.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- esearch.py 2006-04-23 19:52:23.000000000 -0400 -+++ esearch.py 2006-04-24 00:50:11.622989250 -0400 -@@ -81,7 +81,7 @@ - for file in list: - if file[-7:] == ".ebuild": - pv = file[:-7] -- pkgs.append(pkgsplit(pv)) -+ pkgs.append([pkgsplit(pv)]) - pkgs[-1].append(path + "/" + file) - if searchdef != "" and pv == searchdef: - defebuild = (searchdef, pkgs[-1][3]) diff --git a/app-portage/esearch/files/124601-remove-deprecated-syntax.patch b/app-portage/esearch/files/124601-remove-deprecated-syntax.patch index 5692a1e4de26..bc6c74ed317b 100644 --- a/app-portage/esearch/files/124601-remove-deprecated-syntax.patch +++ b/app-portage/esearch/files/124601-remove-deprecated-syntax.patch @@ -1,11 +1,99 @@ ---- esync.py 2006-05-25 22:07:24.000000000 -0400 -+++ esync.py 2006-05-25 22:12:52.287867750 -0400 +Only in esearch-0.7.1-patched: diff +diff -ur esearch-0.7.1/en/esync.1 esearch-0.7.1-patched/en/esync.1 +--- esearch-0.7.1/en/esync.1 2006-06-05 16:27:11.000000000 +0200 ++++ esearch-0.7.1-patched/en/esync.1 2006-06-05 16:31:38.000000000 +0200 +@@ -1,16 +1,16 @@ + .TH esearch 1 "February 13, 2005" "esync" + + .SH "NAME" +-esync \- Calls 'emerge sync' and 'eupdatedb' and shows updates ++esync \- Calls 'emerge --sync' and 'eupdatedb' and shows updates + + .SH "SYNOPSIS" + .B esync + [ options ] + + .SH "DESCRIPTION" +-esync first imports the old esearch index, then calls 'emerge sync' +-or 'emerge-webrsync' and 'eupdatedb'. Then it shows the new and the +-updated packages. ++esync first imports the old esearch index, then calls 'emerge --sync' ++(or an alternative command: see options) and 'eupdatedb'. Then it ++shows the new and the updated packages. + + .SH "OPTIONS" + .TP +@@ -18,10 +18,10 @@ + Print help message + .TP + .B \-\-webrsync, \-w +-Use 'emerge-webrsync' instead of 'emerge sync' ++Use 'emerge-webrsync' instead of 'emerge --sync' + .TP + .B \-\-metadata, \-m +-Use 'emerge --metadata' instead of 'emerge sync' ++Use 'emerge --metadata' instead of 'emerge --sync' + .TP + .B \-\-nocolor, \-n + Don't use ANSI codes for colored output +diff -ur esearch-0.7.1/it/esync.1 esearch-0.7.1-patched/it/esync.1 +--- esearch-0.7.1/it/esync.1 2006-06-05 16:27:11.000000000 +0200 ++++ esearch-0.7.1-patched/it/esync.1 2006-06-05 16:24:43.000000000 +0200 +@@ -1,7 +1,7 @@ + .TH esearch 1 "08 Luglio 2004" "esearch" + + .SH "NOME" +-esync \- Esegue 'emerge sync' e 'eupdatedb' mostrando gli aggiornamenti ++esync \- Esegue 'emerge --sync' e 'eupdatedb' mostrando gli aggiornamenti + + .SH "SINTASSI" + .B esync +@@ -9,8 +9,8 @@ + + .SH "DESCRIZIONE" + esync prima importa il vecchio indice di esearch, quindi esegue +-'emerge sync' o 'emerge-webrsync' e 'eupdatedb'. Quindi mostra i +-nuovi pacchetti e quelli aggiornati. ++'emerge --sync' (o un comando alternativo: vedi opzioni) e 'eupdatedb'. ++Quindi mostra i nuovi pacchetti e quelli aggiornati. + + .SH "OPZIONI" + .TP +@@ -18,10 +18,10 @@ + Stampa un messaggio di aiuto. + .TP + .B \-\-webrsync, \-w +-Usa 'emerge-webrsync' invece di 'emerge sync'. ++Usa 'emerge-webrsync' invece di 'emerge --sync'. + .TP + .B \-\-metadata, \-m +-Usa 'emerge --metadata' invece di 'emerge sync'. ++Usa 'emerge --metadata' invece di 'emerge --sync'. + .TP + .B \-\-nocolor, \-n + Non usa i codici colore ANSI per la stampa. +diff -ur esearch-0.7.1/esync.py esearch-0.7.1-patched/esync.py +--- esearch-0.7.1/esync.py 2006-06-05 16:27:11.000000000 +0200 ++++ esearch-0.7.1-patched/esync.py 2006-06-05 16:22:22.000000000 +0200 @@ -22,7 +22,7 @@ from common import needdbversion --syncprogram = "/usr/bin/emerge sync" -+syncprogram = "/usr/bin/emerge --sync" +-syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/bin/emerge sync" ++syncprogram = "EMERGE_DEFAULT_OPTS=\"\" /usr/bin/emerge --sync" logfile_sync = "/var/log/emerge-sync.log" tmp_prefix = "/tmp/esync" +@@ -42,10 +42,10 @@ + print " Print this help message" + print "" + print darkgreen(" --webrsync") + ", " + darkgreen("-w") +- print " Use 'emerge-webrsync' instead of 'emerge sync'" ++ print " Use 'emerge-webrsync' instead of 'emerge --sync'" + print "" + print darkgreen(" --metadata") + ", " + darkgreen("-m") +- print " Use 'emerge --metadata' instead of 'emerge sync'" ++ print " Use 'emerge --metadata' instead of 'emerge --sync'" + print "" + print darkgreen(" --nocolor") + ", " + darkgreen("-n") + print " Don't use ANSI codes for colored output" diff --git a/app-portage/esearch/files/146555-esearch-manifest2.patch b/app-portage/esearch/files/146555-esearch-manifest2.patch new file mode 100644 index 000000000000..6daf7f95e75f --- /dev/null +++ b/app-portage/esearch/files/146555-esearch-manifest2.patch @@ -0,0 +1,57 @@ +diff -Nur esearch.orig/eupdatedb.py esearch/eupdatedb.py +--- esearch.orig/eupdatedb.py 2008-12-30 21:57:59.000000000 -0800 ++++ esearch/eupdatedb.py 2008-12-31 16:50:52.000000000 -0800 +@@ -9,6 +9,7 @@ + from time import time + start = time() + ++import os + import sys + import re + from os import stat, unlink, environ, open, fdopen, O_RDONLY, O_EXCL, O_CREAT, O_WRONLY +@@ -22,8 +23,12 @@ + import portage + try: + from portage.output import red, darkgreen, green, bold, nocolor ++ from portage.manifest import Manifest ++ from portage.exception import PortageException + except ImportError: + from output import red, darkgreen, green, bold, nocolor ++ from portage_manifest import Manifest ++ from portage_exception import PortageException + + from common import needdbversion, version + +@@ -66,14 +71,15 @@ + def getfs(pkg): + # from /usr/bin/emerge + try: +- mysum = 0 +- mydigest = portage.portdb.finddigest(pkg) +- +- myfilefd = open(mydigest, O_RDONLY) +- myfile = fdopen(myfilefd, "r") +- for line in myfile.readlines(): +- mysum += int(line.split(" ")[3]) +- myfile.close() ++ myebuild = portage.portdb.findname(pkg) ++ pkgdir = os.path.dirname(myebuild) ++ mf = Manifest(pkgdir, portage.settings["DISTDIR"]) ++ if hasattr(portage.portdb, "getFetchMap"): ++ fetchlist = portage.portdb.getFetchMap(pkg) ++ else: ++ fetchlist = portage.portdb.getfetchlist(pkg, ++ mysettings=portage.settings, all=True)[1] ++ mysum = mf.getDistfilesSize(fetchlist) + mystr = str(mysum/1024) + mycount = len(mystr) + while (mycount > 3): +@@ -82,7 +88,7 @@ + mysum = mystr + " kB" + + return mysum +- except: ++ except (PortageException, KeyError): + return "[no/bad digest]" + + try: diff --git a/app-portage/esearch/files/186994-esync-quiet.patch b/app-portage/esearch/files/186994-esync-quiet.patch new file mode 100644 index 000000000000..241057fcfbc1 --- /dev/null +++ b/app-portage/esearch/files/186994-esync-quiet.patch @@ -0,0 +1,139 @@ +diff -ru esearch.orig/en/esync.1 esearch/en/esync.1 +--- esearch.orig/en/esync.1 2008-12-31 20:00:18.000000000 -0600 ++++ esearch/en/esync.1 2008-12-31 20:06:17.000000000 -0600 +@@ -1,34 +1,36 @@ +-.TH esearch 1 "February 13, 2005" "esync" +- ++.TH "esearch" "1" "February 13, 2005" "esync" "" + .SH "NAME" +-esync \- Calls 'emerge --sync' and 'eupdatedb' and shows updates ++esync \- Calls 'emerge \-\-sync' and 'eupdatedb' and shows updates + + .SH "SYNOPSIS" + .B esync + [ options ] + + .SH "DESCRIPTION" +-esync first imports the old esearch index, then calls 'emerge --sync' ++esync first imports the old esearch index, then calls 'emerge \-\-sync' + (or an alternative command: see options) and 'eupdatedb'. Then it + shows the new and the updated packages. + + .SH "OPTIONS" +-.TP ++.TP + .B \-\-help, \-h + Print help message +-.TP ++.TP + .B \-\-webrsync, \-w +-Use 'emerge-webrsync' instead of 'emerge --sync' +-.TP ++Use 'emerge\-webrsync' instead of 'emerge \-\-sync' ++.TP + .B \-\-metadata, \-m +-Use 'emerge --metadata' instead of 'emerge --sync' +-.TP ++Use 'emerge \-\-metadata' instead of 'emerge \-\-sync' ++.TP + .B \-\-nocolor, \-n + Don't use ANSI codes for colored output +-.TP ++.TP ++.B \\-\\-quiet, \\-q ++Less output (implies \\-\\-nospinner) ++.TP + .B \-\-verbose, \-v + Verbose output +-.TP ++.TP + .B \-\-nospinner, \s + Don't display the remaining index count + +Only in esearch/en: esync.1.orig +diff -ru esearch.orig/esync.py esearch/esync.py +--- esearch.orig/esync.py 2008-12-31 20:00:19.000000000 -0600 ++++ esearch/esync.py 2008-12-31 20:04:17.000000000 -0600 +@@ -53,6 +53,9 @@ + print darkgreen(" --nocolor") + ", " + darkgreen("-n") + print " Don't use ANSI codes for colored output" + print "" ++ print darkgreen(" --quiet") + ", " + darkgreen("-q") ++ print " Less output (implies --nospinner)" ++ print "" + print darkgreen(" --verbose") + ", " + darkgreen("-v") + print " Verbose output" + print "" +@@ -63,7 +66,7 @@ + sys.exit(0) + + try: +- opts = getopt(sys.argv[1:], "hwmnvs", ["help", "webrsync", "nocolor", "verbose", "metadata", "nospinner"]) ++ opts = getopt(sys.argv[1:], "hwmnvs", ["help", "webrsync", "nocolor", "quiet", "verbose", "metadata", "nospinner"]) + except GetoptError, error: + print red(" * Error:"), error, "(see", darkgreen("--help"), "for all options)" + print +@@ -82,8 +85,13 @@ + eoptions = "-n" + nocolor() + showtitles = False ++ elif arg in ("-q", "--quiet"): ++ eupdatedb_extra_options = "-q" ++ quiet = True ++ verbose = False + elif arg in ("-v", "--verbose"): + verbose = True ++ quiet = False + elif arg in ("-s", "--nospinner"): + eupdatedb_extra_options = "-q" + +@@ -92,6 +100,7 @@ + global showtitles + if showtitles: + xtermTitle(msg) ++ if quiet: return + print green(" *"), msg + + def outofdateerror(): +@@ -131,9 +140,9 @@ + + tree_old = gettree("old") + +-emsg("Doing '" + syncprogram + "' now") ++if not quiet: emsg("Doing '" + syncprogram + "' now") + +-if verbose == True: ++if verbose: + errorcode = os.system(syncprogram + " | tee " + logfile_sync + " 2>&1") + else: + errorcode = os.system(syncprogram + " > " + logfile_sync + " 2>&1") +@@ -143,16 +152,17 @@ + print "" + sys.exit(1) + +-print "" ++if not quiet: ++ print "" ++ emsg("Doing 'eupdatedb' now") ++ print "" + +-emsg("Doing 'eupdatedb' now") +-print "" + if os.system("/usr/sbin/eupdatedb " + eoptions + " " + eupdatedb_extra_options) != 0: + print "" + print red(" * Error:"), "eupdatedb failed" + sys.exit(1) + +-print "" ++if not quiet: print "" + + tree_new = gettree("new") + +@@ -181,6 +191,7 @@ + if (pkg not in old_keys) or (old[pkg] != new[pkg]): + os.system("/usr/bin/esearch " + eoptions + " -Fc ^" + pkg + "$ | head -n1") + haspkg = True ++ break + + if not haspkg: + emsg("No updates found") diff --git a/app-portage/esearch/files/244450-deprecated.patch b/app-portage/esearch/files/244450-deprecated.patch deleted file mode 100644 index 4b9c430ffff9..000000000000 --- a/app-portage/esearch/files/244450-deprecated.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Nur esearch.orig/esearch.py esearch/esearch.py ---- esearch.orig/esearch.py 2008-12-28 22:48:35.000000000 -0800 -+++ esearch/esearch.py 2008-12-28 22:55:45.000000000 -0800 -@@ -13,7 +13,10 @@ - sys.path.insert(0, "/usr/lib/portage/pym") - sys.path.insert(0, "/usr/lib/esearch") - --from output import bold, red, green, darkgreen, turquoise, nocolor -+try: -+ from portage.output import bold, red, green, darkgreen, turquoise, nocolor -+except ImportError: -+ from output import bold, red, green, darkgreen, turquoise, nocolor - from os.path import exists - import re - -diff -Nur esearch.orig/esync.py esearch/esync.py ---- esearch.orig/esync.py 2008-12-28 22:48:35.000000000 -0800 -+++ esearch/esync.py 2008-12-28 22:58:02.000000000 -0800 -@@ -18,7 +18,10 @@ - sys.path.insert(0, "/usr/lib/portage/pym") - - import portage --from output import red, green, bold, darkgreen, nocolor, xtermTitle -+try: -+ from portage.output import red, green, bold, darkgreen, nocolor, xtermTitle -+except ImportError: -+ from output import red, green, bold, darkgreen, nocolor, xtermTitle - - from common import needdbversion - -diff -Nur esearch.orig/eupdatedb.py esearch/eupdatedb.py ---- esearch.orig/eupdatedb.py 2008-12-28 22:48:35.000000000 -0800 -+++ esearch/eupdatedb.py 2008-12-28 22:57:05.000000000 -0800 -@@ -20,7 +20,10 @@ - sys.path.insert(0, "/usr/lib/esearch") - - import portage --from output import red, darkgreen, green, bold, nocolor -+try: -+ from portage.output import red, darkgreen, green, bold, nocolor -+except ImportError: -+ from output import red, darkgreen, green, bold, nocolor - - from common import needdbversion, version - diff --git a/app-portage/esearch/files/97462-esearch-metadata.patch b/app-portage/esearch/files/97462-esearch-metadata.patch index c78ef03f8664..a01c6b342134 100644 --- a/app-portage/esearch/files/97462-esearch-metadata.patch +++ b/app-portage/esearch/files/97462-esearch-metadata.patch @@ -1,25 +1,38 @@ diff -ur esearch-0.7.1/en/esync.1 esearch-0.7.1-patched/en/esync.1 --- en/esync.1 2005-02-13 18:12:03.000000000 +0100 -+++ en/esync.1 2005-06-30 16:48:44.000000000 +0200 ++++ en/esync.1 2006-06-05 13:37:40.000000000 +0200 @@ -20,6 +20,9 @@ .B \-\-webrsync, \-w Use 'emerge-webrsync' instead of 'emerge sync' .TP +.B \-\-metadata, \-m -+Use 'emerge metadata' instead of 'emerge sync' ++Use 'emerge --metadata' instead of 'emerge sync' +.TP .B \-\-nocolor, \-n Don't use ANSI codes for colored output .TP +diff -ur esearch-0.7.1/it/esync.1 esearch-0.7.1-patched/it/esync.1 +--- it/esync.1 2005-02-13 17:23:38.000000000 +0100 ++++ it/esync.1 2006-06-05 13:40:13.000000000 +0200 +@@ -20,6 +20,9 @@ + .B \-\-webrsync, \-w + Usa 'emerge-webrsync' invece di 'emerge sync'. + .TP ++.B \-\-metadata, \-m ++Usa 'emerge --metadata' invece di 'emerge sync'. ++.TP + .B \-\-nocolor, \-n + Non usa i codici colore ANSI per la stampa. + .TP diff -ur esearch-0.7.1/esync.py esearch-0.7.1-patched/esync.py --- esync.py 2005-02-13 17:53:38.000000000 +0100 -+++ esync.py 2005-06-30 16:51:46.000000000 +0200 ++++ esync.py 2006-06-05 13:37:40.000000000 +0200 @@ -44,6 +44,9 @@ print darkgreen(" --webrsync") + ", " + darkgreen("-w") print " Use 'emerge-webrsync' instead of 'emerge sync'" print "" + print darkgreen(" --metadata") + ", " + darkgreen("-m") -+ print " Use 'emerge metadata' instead of 'emerge sync'" ++ print " Use 'emerge --metadata' instead of 'emerge sync'" + print "" print darkgreen(" --nocolor") + ", " + darkgreen("-n") print " Don't use ANSI codes for colored output" |