Le samedi 31 août 2013 à 16:49 +0200, Michał Górny a écrit :
> Dnia 2013-08-31, o godz. 15:00:43
> Gilles Dartiguelongue <[email protected]> napisał(a):
> 
> > Le samedi 31 août 2013 à 13:40 +0200, Michał Górny a écrit :
> > > > +       cat "${tmp_file}" > 
> > > > "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
> > > 
> > > Why not mv or cp? Also you need '|| die' here since 'cat' can fail
> > > writing.
> > 
> > I'd have to look back at the original bug report to get the exact reason
> > but it seems mv/cp was not atomic enough.
> 
> Well, 'cat' is not atomic at all, so definitely not that :). 'mv' is
> the only command that you can expect to at least try to be atomic.
> 
> It may had something to do with file metadata or symlinks.

I sort of remember there was a bug report but I can find no trace of it.
All I could find was the commit that introduced this logic, by lxnay:

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

@lxnay, could you please comment on previous question ?

> > > And please ensure to remove it in pkg_postrm() when last version
> > > of gdk-pixbuf is unmerged.
> > 
> > I am not clear on this last sentence. Could you reformulate it please ?
> 
> In gdk-pixbuf, something like:
> 
> pkg_postrm() {
>   # TODO: check if i used the correct variable :)
>   [[ ${REPLACING_VERSIONS} ]] || rm -f "${EROOT}"usr/.../loaders.cache
> }
> 

ok, will do.

-- 
Gilles Dartiguelongue <[email protected]>
Gentoo

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to