1 |
Dnia 2013-08-31, o godz. 15:00:43 |
2 |
Gilles Dartiguelongue <eva@g.o> napisał(a): |
3 |
|
4 |
> Le samedi 31 août 2013 à 13:40 +0200, Michał Górny a écrit : |
5 |
> > > + cat "${tmp_file}" > "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" |
6 |
> > |
7 |
> > Why not mv or cp? Also you need '|| die' here since 'cat' can fail |
8 |
> > writing. |
9 |
> |
10 |
> I'd have to look back at the original bug report to get the exact reason |
11 |
> but it seems mv/cp was not atomic enough. |
12 |
|
13 |
Well, 'cat' is not atomic at all, so definitely not that :). 'mv' is |
14 |
the only command that you can expect to at least try to be atomic. |
15 |
|
16 |
It may had something to do with file metadata or symlinks. |
17 |
|
18 |
> > And please ensure to remove it in pkg_postrm() when last version |
19 |
> > of gdk-pixbuf is unmerged. |
20 |
> |
21 |
> I am not clear on this last sentence. Could you reformulate it please ? |
22 |
|
23 |
In gdk-pixbuf, something like: |
24 |
|
25 |
pkg_postrm() { |
26 |
# TODO: check if i used the correct variable :) |
27 |
[[ ${REPLACING_VERSIONS} ]] || rm -f "${EROOT}"usr/.../loaders.cache |
28 |
} |
29 |
|
30 |
-- |
31 |
Best regards, |
32 |
Michał Górny |