Gentoo Archives: gentoo-dev

From: Michael Haubenwallner <michael.haubenwallner@×××××××.at>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] new glep draft: Portage as a secondary package manager
Date: Fri, 20 May 2005 12:32:05
Message-Id: 428DD85A.8030704@salomon.at
In Reply to: Re: [gentoo-dev] new glep draft: Portage as a secondary package manager by Jason Stubbs
1 Jason Stubbs wrote:
2 <snip>
3 > I intend that the package to be installed should not assume anything about
4 > where its dependencies are and should query portage for them all.
5
6 Oh no, now many things get much clearer to me :(
7
8 But - aren't there many settings left over to the packages to decide,
9 at least to choose the package-defaults ?
10
11 > Requiring ebuilds to have special handling for when their dependencies
12 > are in the same ${PREFIX} and when in a different ${PREFIX} just seems
13 > crazy to me.
14
15 Agreed.
16 You intend to use some portage-API in ebuilds which knows where and how
17 to look for dependencies, did i get this right ?
18 But having portage to behave differently seems crazy to me though.
19
20 > If portage doesn't tell the packages what to build against, they'll go their
21 > own merry way which would definitely make the binary packages mentioned below
22 > impossible.
23
24 Disagreed - binary packages right now can only be shared between highly
25 identical machines...
26
27 It seems that there are two philosophies of how packages find their
28 dependencies:
29
30 1) The Gentoo-Linux one:
31 All the depency information comes from the package manager and is
32 passed to packages by commandline, skipping the whole
33 autoconf-intelligence.
34
35 pro:
36 + The patching required for packages is less complex, most of the
37 time the autoconf-intelligence has to be disabled if there's a
38 commandline parameter missing for a particular feature.
39
40 contra:
41 - To get this work on different platforms, an autoconf alike
42 intelligence has to be re-implemented to portage and the ebuilds,
43 including access to provided/injected packages or to the
44 primary pkg mgr's database.
45
46 - External packages installed by hand into the primary prefix will not
47 be stored in the primary pkg mgr's database and therefore cannot
48 be seen by portage as the secondary mgr once portage could read it.
49
50 - There's always a rest of decicions left to the package's
51 autoconf-intelligence.
52
53 - This works for the primary package mgr, but would become
54 unmaintainable for secondary installations - which is your
55 legitimate fear.
56
57 - Different behaviour seems to be required within the ebuilds or
58 (through an API) portage if installed to / or prefix or ~.
59
60 2) The one necessary for secondary installation:
61 Let the packages decide from environment (PATH,PKG_CONFIG_PATH,...)
62 and filesystem where to find their dependencies, and the package
63 manager just has to prepare the environment variables and the
64 filesystem to let the autoconf intelligence work.
65
66 pro:
67 + Many of the packages already do compile and run on several platforms,
68 by checking the environment and filesystem, and are shipped with the
69 autoconf-intelligence required for that.
70 This intelligence is used and therefore not needed in portage and
71 ebuilds.
72
73 + This is what autoconf/libtool are created for.
74
75 + If there are external packages installed by hand into the primary
76 prefix, they are normally recognized, because they appear on the
77 filesystem and in the environment.
78
79 + When installing within a primary portage, this continues to work.
80
81 + The pkg mgr does nearly the same commands as an administrator likes to
82 do by hand if she has no pkg mgr at hand:
83 ./configure [--prefix=/my/prefix]
84 make
85 make install [DESTDIR=/tmp/inst]
86 without any more arguments ideally.
87
88 + Seems to be much less need for ebuild/portage to behave differently if
89 installed to / or prefix or ~
90
91 contra:
92 - If the autoconf-intelligence does not work, there's more effort needed
93 to create the patches to get it work.
94
95 - There's always a rest of issues needed to be dealt with in some
96 ebuilds.
97
98
99 Portage itself does not predetermine which philosophy to use - it is to
100 the ebuild-dev to choose one - but maybe portage's full-support for the
101 former "doesn't exist and isn't going to exist for a very long time, if
102 ever" (to say it with ciaranm's words).
103
104 To me now, my real problem seems to be the philosophy established
105 in the ebuild-devs right now, could that be the case ?
106
107 > Until portage supports other package formats, an equivalent of
108 > package.provided would be used for this. However, this has nothing to do with
109 > how ebuilds would find out where their dependencies are.
110
111 Agreed, but just to ensure unterstanding:
112 One thing is the dependency tree for the pkg mgr to install all the
113 prerequisites, the other is how packages then find those prerequisites,
114 right ?
115
116 >>>7 Portage needs to be able to configured with one-way dependency
117 >>>allowance between installed package databases. For example, ~ installed
118 >>>packages are allowed to depend on / installed packages.
119
120 When installing a package into ~, a dependency install to / or prefix
121 becomes triggered or sth. like that, do you mean this ?
122
123 > This is just silly, in my opinion. Home-support may have issues beyond
124 > prefix-support, but most of them are the same. Why would you only want to
125 > consider prefix-support and implement it if considering home-support might
126 > invalidate assumptions you make? Doing this pathspec stuff is a huge project
127 > so it's not something that should be rushed into.
128
129 Agreed from your point now since i know the Gentoo-Linux philosophy of
130 what ebuilds have to know and what packages are allowed to know (see
131 above).
132
133 Since i've never installed plugins into my ~, some questions here:
134
135 Can those plugins be installed into prefix or / too ?
136
137 If so, what are the general differences in how to do that against
138 installing into ~ ?
139
140 > Doing it properly should also lay down most of the ground work for getting
141 > full cross-compile support into portage as well. Personally, I wouldn't push
142 > this GLEP for approval at all until those issues are at least looked and
143 > fleshed out a bit as well.
144
145 I've not used cross-compiling yet, but there are cross-compiling bits in
146 the ebuilds - so what does not work now or how can these bits work now ?
147
148 > I'll reiterate; doing this is a huge amount of work. There really needs to be
149 > a guarantee that the effort will be worth it. And to be honest, if the only
150 > benefit is prefix-support then most everybody will consider the effort to
151 > outweigh the return.
152
153 I want to distinguish between the effort for portage itself, which does
154 not immediately hit the ebuilds - it's just a portage-feature not used
155 by the gentoo-ebuild-tree - and the effort to get ebuilds supporting
156 prefix/home install.
157
158 There's always the way to have a separate ebuild-tree for prefix-
159 installation, not containing ebuilds for linux-kernel and the like...
160
161 ~haubi
162 --
163 Michael Haubenwallner SALOMON Automation GmbH
164 Forschung & Entwicklung A-8114 Friesach bei Graz
165 mailto:michael.haubenwallner@×××××××.at http://www.salomon.at
166 No HTML/MIME please, see http://expita.com/nomime.html
167 --
168 gentoo-dev@g.o mailing list

Replies