Use creat() instead of open() with the missing O_TRUNC. Regression introduced in f2115151c19ff37b305296c23225807b0832086b.
@@ -1,5 +1,9 @@
dpkg (1.15.8.8) UNRELEASED; urgency=low
+ [ Guillem Jover ]
+ * Truncate the output part file on “dpkg-split -s”. Regression introduced
+ with the C rewrite.
+
[ Updated man page translations ]
* Two typos fixed in French (Christian Perrier, thanks to Julien
Valroff).
@@ -196,7 +196,7 @@ mksplit(const char *file_src, const char *prefix, size_t partsize,
}
/* Split the data. */
- fd_dst = open(file_dst.buf, O_CREAT | O_WRONLY, 0644);
+ fd_dst = creat(file_dst.buf, 0644);
if (fd_dst < 0)
ohshite(_("unable to open file '%s'"), file_dst.buf);