Hi guys, a long long time ago I began having problems with portage which seemingly only affected me. I talked to some guys on #gentoo-dev or #gentoo-portage (I'm not sure what was the channel) who did take part in portage development, but couldn't fix it. In the 2.0.51_pre series the last version I remember not giving me problems was 2.0.51_pre10, with it I can emerge anything, from source or binary and whatever DEPENDS the ebuild has. From pre11 on I often get errors which always look like (this is with the last one released, pre17): # emerge mozilla -p Invalid package name: moznomail These are the packages that I would merge, in order: Calculating dependencies !!! Problem in net-www/mozilla dependencies. !!! 73 This time I decided to chase the problem until I found it. One thing common to all the errors I was getting with pre17 is that it involved negated dependencies, e.g. the above error results from this RDEPEND in mozilla's ebuild: RDEPEND="java? ( virtual/jre ) crypt? ( !moznomail ( >=app-crypt/gnupg-1.2.1 ) )" As you may see it is the negated moznomail which has, allegedly, an invalid package name. Another source of errors is depending on inexistent packages (this was the good side of the bug, it found errors within gcc ebuilds). The ebuild hardened-gcc does not exist anymore within portage yet gcc's ebuilds include it within their list of DEPENDs. It is included negated, but it is included: DEPEND="virtual/libc !uclibc? ( >=sys-libs/glibc-2.3.3_pre20040420-r1 ) !uclibc? ( hardened? ( >=sys-libs/glibc-2.3.3_pre20040529 ) ) ( !sys-devel/hardened-gcc ) ... The error for the above is: Invalid package name: sys-devel/hardened-gcc These are the packages that I would merge, in order: Calculating dependencies !!! Problem in sys-devel/gcc dependencies. !!! 73 As you can see, it is quite identical to the one with the negated moznomail. Indeed, now that I think of it, the cause seems the same, the !, not that hardened-gcc does not exist anymnore. Anyhow, I think it is something needing a change. I attach two patches. The first one is the hunk of difference between pre10 and pre11 which made the difference between a clean portage which gives no problems, and a hosed one which often complain about invalid package names. The second one is for the current _pre17. Unlike the former one which affected bin/emerge, thus not touching ebuild.sh, pre17's bug is within pym/portage.py, hence it makes `ebuild` also fail in some situations (which as of now I cannot consistently reproduce, I have traced it enough). Hopefully it solves each and every problem. So far I've been able to do and 'emerge -u world --deep --empty-tree -p' without any error, which I couldn't before due to packages like mozilla, mozilla-firefox or gcc, to name a few. Oddly enough, the change I propose for _pre17 has been on purpose judging by the comments the culprit line is surrounded. I read the bug description and that's not the problem I've always had at all. What I don't understand, but puzzles me quite a bit, is how is it possible that this only shows on my systems? This has been present since 2.0.49_something, with a lot of portage released versions making havoc. I tried fresh installs, without moving portage's dir to customs paths or anything like that and even so the bug hit me, on different machines. All of them set up by me, though. It seems it's me rather than the system having the problems. Suggestions, comments, explanations for this behavior will be highly appreciated. Thanks for your help & time. P.S I'm sorry for not narrowing down the first patch a little bit more, but I haven't yet learned Python, maybe I do in the coming months, but ATM I'm happy enough hacking with C, C++ & Perl all day long :) -- Captain's Log, star date 21:34.5... Ö Javier Marcet