Bug 37812 - if dbus-binding-tool fails, it leaves temporary files lying around
Summary: if dbus-binding-tool fails, it leaves temporary files lying around
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: Other All
: medium blocker
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://cgit.freedesktop.org/~smcv/dbu...
Whiteboard: review?
Keywords: patch
Depends on: 36428
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-01 03:56 UTC by Simon McVittie
Modified: 2011-06-02 05:12 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dbus-binding-tool: clean up temporary file on error (5.37 KB, patch)
2011-06-01 03:56 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2011-06-01 03:56:09 UTC
Created attachment 47417 [details] [review]
dbus-binding-tool: clean up temporary file on error

If dbus-binding-tool exits unsuccessfully, it leaves partial output in a file named after its output filename + ".tmp". This causes distcheck to fail in dbus-glib.

As written, this patch depends on the patches to remove vestigial i18n support (Bug #36428), since the alternative is conflict with them. It could be adapted if someone thinks we need to keep i18n support for some reason.

Because distcheck fails, this blocks a release of dbus-glib.
Comment 1 Will Thompson 2011-06-01 07:18:16 UTC
Review of attachment 47417 [details] [review]:

Looks fine, except …

::: dbus/dbus-glib-tool.c
@@ +478,3 @@
+    (void) g_remove (output_file_tmp);
+
+    (void) g_io_channel_shutdown (channel, FALSE, NULL);

Surely you should put this into the if (channel != NULL) {} block?
Comment 2 Simon McVittie 2011-06-02 05:12:12 UTC
Fixed in 0.94


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.