[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [PATCH] gnome2-utils.eclass add support for gdk-pixbuf cache update
From:       Gilles Dartiguelongue <eva () gentoo ! org>
Date:       2013-08-31 16:44:38
Message-ID: 1377967478.19411.11.camel () kanae
[Download RAW message or body]


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 <eva@gentoo.org> 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 <eva@gentoo.org>
Gentoo


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic