Gentoo Archives: gentoo-portage-dev

From: Javier Marcet <javier-ml-gentoo@××××××.info>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Portage dependencies hell and PATCH to solve it
Date: Sun, 15 Aug 2004 05:59:15
Message-Id: 20040815055913.GA4107@marcet.info
1 Hi guys,
2 a long long time ago I began having problems with portage which
3 seemingly only affected me. I talked to some guys on #gentoo-dev or
4 #gentoo-portage (I'm not sure what was the channel) who did take part in
5 portage development, but couldn't fix it.
6
7 In the 2.0.51_pre series the last version I remember not giving me
8 problems was 2.0.51_pre10, with it I can emerge anything, from source
9 or binary and whatever DEPENDS the ebuild has.
10
11 From pre11 on I often get errors which always look like (this is with
12 the last one released, pre17):
13
14 # emerge mozilla -p
15
16
17 Invalid package name: moznomail
18
19 These are the packages that I would merge, in order:
20
21 Calculating dependencies
22 !!! Problem in net-www/mozilla dependencies.
23 !!! 73
24
25 This time I decided to chase the problem until I found it.
26 One thing common to all the errors I was getting with pre17 is that it
27 involved negated dependencies, e.g. the above error results from this
28 RDEPEND in mozilla's ebuild:
29
30 RDEPEND="java? ( virtual/jre )
31 crypt? ( !moznomail ( >=app-crypt/gnupg-1.2.1 ) )"
32
33 As you may see it is the negated moznomail which has, allegedly, an
34 invalid package name.
35
36 Another source of errors is depending on inexistent packages (this was
37 the good side of the bug, it found errors within gcc ebuilds). The
38 ebuild hardened-gcc does not exist anymore within portage yet gcc's
39 ebuilds include it within their list of DEPENDs. It is included negated,
40 but it is included:
41
42
43 DEPEND="virtual/libc
44 !uclibc? ( >=sys-libs/glibc-2.3.3_pre20040420-r1 )
45 !uclibc? ( hardened? ( >=sys-libs/glibc-2.3.3_pre20040529 ) )
46 ( !sys-devel/hardened-gcc )
47 ...
48
49 The error for the above is:
50
51 Invalid package name: sys-devel/hardened-gcc
52
53 These are the packages that I would merge, in order:
54
55 Calculating dependencies
56 !!! Problem in sys-devel/gcc dependencies.
57 !!! 73
58
59 As you can see, it is quite identical to the one with the negated
60 moznomail. Indeed, now that I think of it, the cause seems the same,
61 the !, not that hardened-gcc does not exist anymnore.
62 Anyhow, I think it is something needing a change.
63
64 I attach two patches.
65
66 The first one is the hunk of difference between pre10 and pre11 which made
67 the difference between a clean portage which gives no problems, and a
68 hosed one which often complain about invalid package names.
69
70 The second one is for the current _pre17. Unlike the former one which
71 affected bin/emerge, thus not touching ebuild.sh, pre17's bug is within
72 pym/portage.py, hence it makes `ebuild` also fail in some situations
73 (which as of now I cannot consistently reproduce, I have traced it
74 enough).
75 Hopefully it solves each and every problem. So far I've been able to
76 do and 'emerge -u world --deep --empty-tree -p' without any error, which
77 I couldn't before due to packages like mozilla, mozilla-firefox or gcc,
78 to name a few.
79 Oddly enough, the change I propose for _pre17 has been on purpose
80 judging by the comments the culprit line is surrounded. I read the bug
81 description and that's not the problem I've always had at all.
82
83 What I don't understand, but puzzles me quite a bit, is how is it possible
84 that this only shows on my systems?
85 This has been present since 2.0.49_something, with a lot of portage
86 released versions making havoc. I tried fresh installs, without moving
87 portage's dir to customs paths or anything like that and even so the bug
88 hit me, on different machines. All of them set up by me, though.
89 It seems it's me rather than the system having the problems.
90
91 Suggestions, comments, explanations for this behavior will be highly
92 appreciated.
93
94 Thanks for your help & time.
95
96 P.S I'm sorry for not narrowing down the first patch a little bit more,
97 but I haven't yet learned Python, maybe I do in the coming months, but
98 ATM I'm happy enough hacking with C, C++ & Perl all day long :)
99
100
101 --
102 Captain's Log, star date 21:34.5...
103 Ö
104 Javier Marcet <javier@××××××.info>

Attachments

File name MIME type
portage-2.0.51_pre11-dependencies_hell.fix text/plain
portage-2.0.51_pre17-dependencies_hell.fix text/plain

Replies