def _addTrailingNewline(self, filename, fullpath):
        # FIXME: This exists only for stability; there is no longer
        # any need to add trailing newlines to config files.  This
        # also violates the rule that no files are modified after
        # destdir modification has been completed.
        self.warn("adding trailing newline to config file '%s'" % \
                filename)
        mode = os.lstat(fullpath)[stat.ST_MODE]
        oldmode = None
        if mode & 0600 != 0600:
            # need to be able to read and write the file to fix it
            oldmode = mode
            os.chmod(fullpath, mode|0600)

        f = open(fullpath, 'a')
        f.seek(0, 2)
        f.write('\n')
        f.close()
        if oldmode is not None:
            os.chmod(fullpath, oldmode)