From 3978f923ac814aef014cf412b63d11fd94f60692 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Wed, 8 May 2013 14:26:48 -0500 Subject: [PATCH 1/2] Fix python 3 compatability with 'esearch -e' (Bug 469076) Thanks to zmedico for the patch. --- esearch/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esearch/search.py b/esearch/search.py index f91f5b1..696a0f0 100755 --- a/esearch/search.py +++ b/esearch/search.py @@ -22,6 +22,7 @@ import re try: from portage.output import bold, red, green, darkgreen, turquoise, blue, nocolor from portage import settings, pkgcmp, pkgsplit, portdb, best + from portage.util import cmp_sort_key except ImportError: print("Critical: portage imports failed!") sys.exit(1) @@ -107,7 +108,7 @@ def searchEbuilds(path, portdir=True, searchdef="", repo_num="", data['defebuild'] = (searchdef, pkgs[-1][3]) if not portdir: config['found_in_overlay'] = True - pkgs.sort(mypkgcmp) + pkgs.sort(key=cmp_sort_key(mypkgcmp)) for pkg in pkgs: rev = "" if pkg[2] != "r0": -- 1.8.5.4