Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171024 - app-portage/portage-utils-0.1.23 opening '/usr/portage/.metadata.x' failed
Summary: app-portage/portage-utils-0.1.23 opening '/usr/portage/.metadata.x' failed
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-03-15 13:51 UTC by Toralf Förster
Modified: 2007-04-05 18:43 UTC (History)
0 users

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


Attachments
main--better-initialize_flat-warning-on-EACCES.patch (main--better-initialize_flat-warning-on-EACCES.patch,730 bytes, patch)
2007-03-16 19:34 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2007-03-15 13:51:06 UTC
I get the message :
tfoerste@n22 ~ $ qsearch -c lynx
search: Updating ebuild metacache ...
search: initialize_flat(): opening '/usr/portage/.metadata.x' failed: Permission denied


but in fact the file doesn't exist. The error msg should complain about non-existing file rather than complaining about perms.


Reproducible: Always
Comment 1 TGL 2007-03-16 19:34:14 UTC
(In reply to comment #0)
> The error msg should complain about non-existing file rather than 
> complaining about perms.

The file does not exists, thus qsearch tries to create it, but since you don't have rights to write in the portage directory, it complains about perms.  So this message is correct.

Now, i agree it's not very user-friendly.  I will attach a patch which prints instructions to run "q -m" as root in this case.

Comment 2 TGL 2007-03-16 19:34:57 UTC
Created attachment 113495 [details, diff]
main--better-initialize_flat-warning-on-EACCES.patch
Comment 3 solar (RETIRED) gentoo-dev 2007-03-16 21:28:29 UTC
hrmm I don't think it's supposed to be trying to open that file at all. 
It should be trying to open $PORTDIR/metadata/cache/.metadata.x 
It also looks that q -m got itself broken somewhere along the way.
Comment 4 TGL 2007-03-16 21:39:33 UTC
(In reply to comment #3)
> hrmm I don't think it's supposed to be trying to open that file at all. 
> It should be trying to open $PORTDIR/metadata/cache/.metadata.x 

That's what it does indeed, it's the error message which is wrong. The attached patch fixes that too.
Comment 5 TGL 2007-03-16 21:43:54 UTC
(In reply to comment #1)
> So this message is correct.

(In reply to comment #4)
> it's the error message which is wrong. 


Err... Well, so, it is correct about perms being wrong, and wrong about the file it is about. 
Comment 6 solar (RETIRED) gentoo-dev 2007-03-17 21:08:08 UTC
(In reply to comment #2)
> main--better-initialize_flat-warning-on-EACCES.patch

InCVS main.c revision 1.135

Comment 7 solar (RETIRED) gentoo-dev 2007-04-05 18:42:19 UTC
This is released in 0.1.25

Bug #168334 ; q -r dies with a segfault after emerge --sync
Bug #168442 ; does not  properly parse the profile location
Bug #170795 ; add a -E/--eclass option to qgrep
Bug #170797 ; add a -s/--skip-comments option to qgrep
Bug #171024 ; opening '/usr/portage/.metadata.x' failed
Bug #171374 ; Misc enhancements for qgrep
Bug #172240 ; -A/-B options for qgrep (context lines) 
Bug #172338 ; qgrepping through installed ebuilds (in the VDB) 
Bug #173005 ; Colorized output for qgrep.
Comment 8 solar (RETIRED) gentoo-dev 2007-04-05 18:43:03 UTC
Closing