Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 171024
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: portage-utils <portage-utils@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Toralf Förster <toralf.foerster@gmx.de>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
main--better-initialize_flat-warning-on-EACCES.patch main--better-initialize_flat-warning-on-EACCES.patch patch TGL 2007-03-16 19:34 0000 730 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 171024 depends on: Show dependency tree
Bug 171024 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-03-15 13:51 0000
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 From TGL 2007-03-16 19:34:14 0000 -------
(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 From TGL 2007-03-16 19:34:57 0000 -------
Created an attachment (id=113495) [details]
main--better-initialize_flat-warning-on-EACCES.patch

------- Comment #3 From solar 2007-03-16 21:28:29 0000 -------
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 From TGL 2007-03-16 21:39:33 0000 -------
(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 From TGL 2007-03-16 21:43:54 0000 -------
(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 From solar 2007-03-17 21:08:08 0000 -------
(In reply to comment #2)
> main--better-initialize_flat-warning-on-EACCES.patch

InCVS main.c revision 1.135

------- Comment #7 From solar 2007-04-05 18:42:19 0000 -------
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 From solar 2007-04-05 18:43:03 0000 -------
Closing

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug