Bug 70559 - shared-mime-info-1.2: fdatasync needs writable file descriptor
Summary: shared-mime-info-1.2: fdatasync needs writable file descriptor
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All NetBSD
: highest blocker
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 04:35 UTC by Thomas Klausner
Modified: 2013-10-19 16:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing the described issues. (440 bytes, patch)
2013-10-17 04:35 UTC, Thomas Klausner
Details | Splinter Review

Description Thomas Klausner 2013-10-17 04:35:51 UTC
Created attachment 87770 [details] [review]
Patch fixing the described issues.

shared-mime-info-1.2's update-mime-database tries to use fdatasync on a file descriptor open for reading only, which always fails on NetBSD.

The fdatasync man page for NetBSD says in the ERRORS section:

     [EBADF]            The fd argument is not a valid file descriptor open
                        for writing.

The attached patch fixes this, please commit it soon, because otherwise update-mime-database does not work at all on NetBSD.
Comment 1 Colin Walters 2013-10-19 16:07:35 UTC
Looks correct to me, sorry about the bug!
Comment 2 Bastien Nocera 2013-10-19 16:15:47 UTC
commit 41f1d5ff2672c30d7f86759e2398b75c88673516
Author: Thomas Klausner <tk@giga.or.at>
Date:   Thu Oct 17 04:35:00 2013 +0000

    Open the fdatasync() fd read/write
    
    Otherwise it will fail for stricter OSes like NetBSD.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=70559


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.