1 |
On Mon, 9 Nov 2009 17:37:26 +0100 |
2 |
Ulrich Mueller <ulm@g.o> wrote: |
3 |
> > What Portage currently does is, more or less, to preserve mtimes |
4 |
> > [...] from every part of the build and merge processes, except for |
5 |
> > an arbitrary set of files that it modifies outside of the ebuild's |
6 |
> > control. |
7 |
> |
8 |
> And exactly this should be the guideline: A modified file may have its |
9 |
> mtime updated, an unmodified file has its mtime preserved. But for |
10 |
> some reason this is not wanted and was countered with arguments such |
11 |
> as "the PM could do two passes of rot-13 encryption". |
12 |
|
13 |
It's not wanted because it's utterly useless as a specification. It |
14 |
means ebuilds can't rely upon any file having its mtime preserved, |
15 |
because a package manager can decide, reasonably or otherwise, to |
16 |
modify any file it likes. |
17 |
|
18 |
The double-rot-13 argument is merely a compact illustration of why |
19 |
leaving it open is unworkable. If you prefer a more subtle argument, |
20 |
consider "the package manager might want to rewrite #!/usr/bin/python |
21 |
lines automatically in Prefix environments", but be aware that any |
22 |
example of that nature is prone to being sidetracked into arguments |
23 |
about "but Prefix won't do it that way", entirely missing the wider |
24 |
point. |
25 |
|
26 |
Now, you could claim, as you do, that the proposal should only matter |
27 |
for pkg_preinst to merge mtime preservation, and so rewriting of this |
28 |
kind is fine if it's done straight after src_install. But we have yet |
29 |
to establish whether every ebuild mtime-related operation is best done |
30 |
exclusively in pkg_preinst (and this is far from a straight-forward |
31 |
question, when you have to start thinking about binaries and about |
32 |
cleanup), and it's not safe to jump to the conclusion that allowing the |
33 |
package manager to modify things straight after src_install is safe and |
34 |
in line with what best suits developers. |
35 |
|
36 |
> > None of these strike me as reasonable solutions, and I am still of |
37 |
> > the opinion that this isn't something that should have been rushed |
38 |
> > into EAPI 3 |
39 |
> |
40 |
> The respective bug was opened in March, more than 7 months ago. That's |
41 |
> not what I would call "rush". |
42 |
|
43 |
And it was left out of EAPI 3 originally because no appropriate solution |
44 |
had been found. As you're aware, there's a finite amount of time that |
45 |
can be spent working on these things, and thus-far not enough of that |
46 |
time has been devoted to turning this into a solvable problem. |
47 |
|
48 |
> > without people having spent time taking a good look at what all |
49 |
> > mtime preservation would be needed to do, what Portage currently |
50 |
> > does (since it does not, as some people have claimed, preserve |
51 |
> > mtimes) and what should be done about packages that end up |
52 |
> > installing files with absurd mtimes. |
53 |
> |
54 |
> > If guaranteed mtime preservation is a desired feature, we should be |
55 |
> > designing it around what developers need, not around what Portage |
56 |
> > currently does. |
57 |
> |
58 |
> What if the two coincide? |
59 |
|
60 |
They don't. I have yet to see any argument in favour of random and |
61 |
inconsistent clobbering of sub-second mtimes, and I have yet to see any |
62 |
argument in favour of files with a timestamp of 1 Jan 1970 being merged |
63 |
to /, other than that Portage currently does both of those things. |
64 |
|
65 |
-- |
66 |
Ciaran McCreesh |