Gentoo Archives: gentoo-dev

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-dev@l.g.o
Cc: lxnay@g.o
Subject: Re: [gentoo-dev] [PATCH] gnome2-utils.eclass add support for gdk-pixbuf cache update
Date: Sat, 31 Aug 2013 16:44:51
Message-Id: 1377967478.19411.11.camel@kanae
In Reply to: Re: [gentoo-dev] [PATCH] gnome2-utils.eclass add support for gdk-pixbuf cache update by "Michał Górny"
1 Le samedi 31 août 2013 à 16:49 +0200, Michał Górny a écrit :
2 > Dnia 2013-08-31, o godz. 15:00:43
3 > Gilles Dartiguelongue <eva@g.o> napisał(a):
4 >
5 > > Le samedi 31 août 2013 à 13:40 +0200, Michał Górny a écrit :
6 > > > > + cat "${tmp_file}" > "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
7 > > >
8 > > > Why not mv or cp? Also you need '|| die' here since 'cat' can fail
9 > > > writing.
10 > >
11 > > I'd have to look back at the original bug report to get the exact reason
12 > > but it seems mv/cp was not atomic enough.
13 >
14 > Well, 'cat' is not atomic at all, so definitely not that :). 'mv' is
15 > the only command that you can expect to at least try to be atomic.
16 >
17 > It may had something to do with file metadata or symlinks.
18
19 I sort of remember there was a bug report but I can find no trace of it.
20 All I could find was the commit that introduced this logic, by lxnay:
21
22 http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/gdk-pixbuf/gdk-pixbuf-2.24.0.ebuild?hideattic=0&revision=1.2&view=markup
23
24 @lxnay, could you please comment on previous question ?
25
26 > > > And please ensure to remove it in pkg_postrm() when last version
27 > > > of gdk-pixbuf is unmerged.
28 > >
29 > > I am not clear on this last sentence. Could you reformulate it please ?
30 >
31 > In gdk-pixbuf, something like:
32 >
33 > pkg_postrm() {
34 > # TODO: check if i used the correct variable :)
35 > [[ ${REPLACING_VERSIONS} ]] || rm -f "${EROOT}"usr/.../loaders.cache
36 > }
37 >
38
39 ok, will do.
40
41 --
42 Gilles Dartiguelongue <eva@g.o>
43 Gentoo

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies