Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551206 - app-portage/portage-utils-0.55: qsearch can't match any ebuilds
Summary: app-portage/portage-utils-0.55: qsearch can't match any ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 11:16 UTC by Guilherme Amadio
Modified: 2015-06-06 06:20 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge.info,5.42 KB, text/plain)
2015-06-04 11:16 UTC, Guilherme Amadio
Details
portage-utils-0.55-no_path_in_cache_file.patch (portage-utils-0.55-no_path_in_cache_file.patch,578 bytes, text/plain)
2015-06-05 03:58 UTC, Andrew Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Amadio gentoo-dev 2015-06-04 11:16:10 UTC
qsearch is failing for me on the latest portage-utils, it returns 1 every time.
qsearch -h does work, however.

Reproducible: Always
Comment 1 Guilherme Amadio gentoo-dev 2015-06-04 11:16:39 UTC
Created attachment 404578 [details]
emerge --info
Comment 2 Andrew Miller 2015-06-04 12:43:32 UTC
@radhermit @vapier,

Shoot me an email if you'd like me to write some unit tests for qsearch. I'm not a developer but I like to make small contributions to Gentoo. And I'm brushing up my awk/sed skills atm, so this task could put them to use.
Comment 3 Alex Xu (Hello71) 2015-06-04 16:25:36 UTC
(In reply to Andrew Miller from comment #2)
> @radhermit @vapier,
> 
> Shoot me an email if you'd like me to write some unit tests for qsearch. I'm
> not a developer but I like to make small contributions to Gentoo. And I'm
> brushing up my awk/sed skills atm, so this task could put them to use.

this isn't github. if you want to send someone an email, add them to CC.
Comment 4 Guilherme Amadio gentoo-dev 2015-06-04 18:03:15 UTC
By the way, I forgot to mention this in the initial bug report, but portage-utils-0.54 works just fine.
Comment 5 SpanKY gentoo-dev 2015-06-05 03:47:06 UTC
please post the exact commands you're running
Comment 6 Andrew Miller 2015-06-05 03:58:41 UTC
Created attachment 404602 [details]
portage-utils-0.55-no_path_in_cache_file.patch

Problem seems to be it fails to open $cache_file.

Strace output for =app-portage/portage-utils-0.53:

>open(".ebuild.x", O_RDONLY)             = 3
>open("app-accessibility/accerciser/accerciser-3.12.0.ebuild", O_RDONLY) = 4
>open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 5
>open("app-accessibility/at-spi2-atk/at-spi2-atk-2.12.1.ebuild", O_RDONLY) = 4
[snip]

Strace output for =app-portage/portage-utils-0.55:

>open("/var/cache/edb/dep//usr/portage/repos/gentoo/.ebuild.x", O_RDONLY) = -1 ENOENT (No such file or directory)
[dies here]

Here's a (very amateur) patch that fixes that.
Comment 7 SpanKY gentoo-dev 2015-06-05 09:35:39 UTC
(In reply to Andrew Miller from comment #6)

with the newer version, we specifically do not want the cache in PORTDIR.  please post the exact command you guys are running that is failing.
Comment 8 Andrew Miller 2015-06-05 12:09:53 UTC
(In reply to SpanKY from comment #7)

Sorry for wasting your time. :/

After running "q -r" I have a cache file under /var and qsearch works properly. 

Maybe add a warning to the ebuild advising people to run "q -r" and delete the old cache file? The value of $cache_file looks like a programming mistake, with two paths joined together...
Comment 9 SpanKY gentoo-dev 2015-06-05 16:57:47 UTC
i can reproduce it over here and see the issue