[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 3/3] Ensure that gzfd is closed when writing newer deb format



Guillem Jover:
> On Tue, 2013-08-27 at 18:28:32 +0200, Jérémy Bobbio wrote:
> > ---
> >  dpkg-deb/build.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
> > index 41d14dc..4589e0b 100644
> > --- a/dpkg-deb/build.c
> > +++ b/dpkg-deb/build.c
> > @@ -674,6 +674,8 @@ do_build(const char *const *argv)
> >    /* Okay, we have data.tar as well now, add it to the ar wrapper. */
> >    if (deb_format.major != 0) {
> >      write_data_tar(debar, arfd, gzfd);
> > +    if (fsync(gzfd))
> > +      ohshite(_("unable to close temporary file for data member"));
> >    }
> >    if (fsync(arfd))
> >      ohshite(_("unable to sync file '%s'"), debar);
> 
> Nicely spot, I applied a patch that close()es the fd (instead of
> fsync()ing it) […]

*sigh* Yes. As written all around, that was the initial intent. :)

-- 
Lunar                                .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: