Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394209 - app-portage/esearch-1.0: search.py hardcodes /usr/lib/portage/pym, breaks prefix
Summary: app-portage/esearch-1.0: search.py hardcodes /usr/lib/portage/pym, breaks prefix
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 04:54 UTC by Zac Medico
Modified: 2011-12-12 18:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2011-12-10 04:54:44 UTC
Since /usr/lib/portage/pym is hardcoded, portage.const.EPREFIX from prefix portage is not imported, triggering the following error because it looks for the index in /var/cache/edb/ instead of $EPREFIX/var/cache/edb/:

 * Error: Could not find esearch-index. Please run eupdatedb as root first

This patch fixes it:

--- search.py
+++ search.py
@@ -15,7 +15,7 @@
 from os.path import isdir, exists
 import re
 
-sys.path.insert(0, "/usr/lib/portage/pym")
+#sys.path.insert(0, "/usr/lib/portage/pym")
 # commented out so it can run from the git checkout
 #sys.path.insert(0, "/usr/lib/esearch")
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2011-12-10 07:55:34 UTC
Ah, missed a spot :(

Thanks
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2011-12-10 08:01:21 UTC
Applied in commit: https://github.com/fuzzyray/esearch/commit/8399831cd2f5968fc45d0f1dc4e131368161e39a
Comment 3 Paul Varner (RETIRED) gentoo-dev 2011-12-12 18:46:44 UTC
Strange that I didn't catch this since I've been running esearch-9999 on my Mac OS prefix for several months prior to release.

Anyhow, fixed in esearch-1.0-r1