Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132548 - esearch fix for multiple overlay, and few other 'bugs'
Summary: esearch fix for multiple overlay, and few other 'bugs'
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alec Warner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-07 04:15 UTC by samLT
Modified: 2006-06-11 13:30 UTC (History)
0 users

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


Attachments
132548-multiple-overlay.patch (132548-multiple-overlay.patch,4.46 KB, patch)
2006-05-07 04:18 UTC, samLT
Details | Diff
esearch-0.7.1-r3.ebuild (esearch-0.7.1-r3.ebuild,1.64 KB, text/plain)
2006-05-07 04:25 UTC, samLT
Details
enhanced patch (132548-multiple-overlay.patch,4.88 KB, patch)
2006-05-18 14:12 UTC, samLT
Details | Diff
132548-multiple-overlay.patch (132548-multiple-overlay.patch,4.88 KB, patch)
2006-05-18 14:13 UTC, samLT
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description samLT 2006-05-07 04:15:36 UTC
First, I know, there is app-portage/eix, but, IMO, eix is missing the ability to edit/view ebuilds.



When having several overlays, e.g.:
PORTDIR_OVERLAY="/usr/local/overlays/portage /usr/local/overlays/test" (or more) 
esearch wasn't able to search in overlays --> fixed, it also now shows in which overlay it was found(see below, how it looks).





When having two same version of a package, in PORTDIR and/or PORTDIR_OVERLAY (yes, this can happen..), there was a problem editing/viewing the ebuild: it  always opened the first ebuild found in that version no matter which number we choose.
e.g.: ( touch /usr/local/overlays/test/media-sound/mpd-0.11.5-r2.ebuild same with mpd-9999.ebuild)

=====code=====
esearch -e mpd:
<--cut-->
[ I] media-sound/mpd (9999):  A development version of Music Player Daemon (mpd)
 Portage     [1] mpd-0.11.5
 Portage     [2] mpd-0.11.5-r2
 Overlay 1   [3] mpd-0.11.5-r2
 Overlay 1   [4] mpd-9999
 Overlay 2   [5] mpd-9999
<--cut-->
Overlay 1 : /usr/local/overlays/test
Overlay 2 : /usr/local/overlays/portage

Show Ebuild: 
=====code=====

no matter if I enter '2' or '3', it always opened /usr/portage/media-sound/mpd-0.11.5-r2.ebuild 
no matter if I enter '4' or '5', it always opened /usr/portage/media-sound/mpd-9999.ebuild 

==> This is now also fixed in the patch



The patch I wrote also remove a "/" that wasn't needed, since actually, instead of opening (e.g.) '/usr/portage/media-sound/mpd-0.11.5-r2.ebuild' it used to open '/usr/portage/media-sound//mpd-0.11.5-r2.ebuild'



And finally there was a typo, preventing "esearch --ebuild pagkage_name" to work (as it should : "esearch -e package_name" )
Comment 1 samLT 2006-05-07 04:18:03 UTC
Created attachment 86344 [details, diff]
132548-multiple-overlay.patch
Comment 2 samLT 2006-05-07 04:25:26 UTC
Created attachment 86345 [details]
esearch-0.7.1-r3.ebuild
Comment 3 samLT 2006-05-07 04:31:32 UTC
> =====code=====
> esearch -e mpd:
> <--cut-->
> [ I] media-sound/mpd (9999):  A development version of Music Player Daemon
> (mpd)
>  Portage     [1] mpd-0.11.5
>  Portage     [2] mpd-0.11.5-r2
>  Overlay 1   [3] mpd-0.11.5-r2
>  Overlay 1   [4] mpd-9999
>  Overlay 2   [5] mpd-9999
> <--cut-->
> Overlay 1 : /usr/local/overlays/test
> Overlay 2 : /usr/local/overlays/portage
> 
> Show Ebuild: 
> =====code=====
> 
> no matter if I enter '2' or '3', it always opened
> /usr/portage/media-sound/mpd-0.11.5-r2.ebuild 
> no matter if I enter '4' or '5', it always opened
> /usr/portage/media-sound/mpd-9999.ebuild 
> 

SORRY I made a type:
no matter if I enter '4' or '5', it always opened
/usr/local/overlays/portage/media-sound/mpd-9999.ebuild 
Comment 4 samLT 2006-05-18 14:12:26 UTC
Created attachment 87011 [details, diff]
enhanced patch

enhanced patch wich will make esearch display PORTDIR_OVERLAY only if needed
Comment 5 samLT 2006-05-18 14:13:52 UTC
Created attachment 87013 [details, diff]
132548-multiple-overlay.patch

put a real name to the patch
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-05-25 20:48:23 UTC
I will review this and hopefully grab it as -r4 this weekend.
Comment 7 samLT 2006-05-31 16:23:17 UTC
(In reply to comment #6)
> I will review this and hopefully grab it as -r4 this weekend.
> 

I don't know if it's possible to reopen a bug.. but there is something wrong with the 105234-fix-2.1-cache.patch :


esearch -e mpd
Traceback (most recent call last):
  File "/usr/bin/esearch", line 316, in ?
    searchEbuilds("%s/%s/" % (portdir, pkg[1]), True, searchdef)
  File "/usr/bin/esearch", line 87, in searchEbuilds
    defebuild = (searchdef, pkgs[-1][3])
IndexError: list index out of range


that's normal since pkgs is not the same as before, I thought replacing the line 87:    

defebuild = (searchdef, pkgs[-1][3])

with 

defebuild = (searchdef, pkgs[-1][1])

should be enough but it's not:
./esearch.py -e mpd
Traceback (most recent call last):
  File "./esearch.py", line 316, in ?
    searchEbuilds("%s/%s/" % (portdir, pkg[1]), True, searchdef)
  File "./esearch.py", line 88, in searchEbuilds
    pkgs.sort(pkgcmp)
TypeError: comparison function must return int


and since I don't know what to do with this pkgs.sort(pkgcmp), I am stucked.. it would be great if you could help me on this.

Comment 8 samLT 2006-06-08 16:42:18 UTC
added a comment on #105234 but I don't know how to reopen a bug. IMO the patch isn't ready yet.
Comment 9 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-06-11 13:30:21 UTC
This is in -r4, please test it, it works here.