On Sat, Apr 13, 2013 at 10:44 AM, Michał Górny <mgo...@gentoo.org> wrote:
> The edos2unix is quite useful when handling DOS-sourced packages.
> But since it's a bash function, you can't reasonably use it from within
> find invocation. And often you hit packages which are all flooded with
> CRLFs that you need to convert.
>
> That's why I'm suggesting to make edos2unix recursive. The posted patch
> changes the function to use find+sed for the substitution, passing given
> paths as the 'path' arguments to find.
>
> Whenever files are passed, nothing changes for ebuilds. If a directory
> is passed, find converts it recursively. The only potential breakage is
> when a non-file was passed and something weird was expected of it.
>
> Any thoughts? If nobody opposes, I will commit the patch in 7 days.
>

If used improperly, this could easily end up breaking binary files
that happen to contain the '\r' byte. Maybe a DEPEND on dos2unix would
be a better option in the case where many files must be converted.

I don't think it is necessary to convert DOS text files unless they
somehow break on a UNIX system. Shell scripts are a good example, as
well as some autotools files. No need to convert README though.

I would guess that this patch is a response to bug 465790. I'm ok with
requiring that python scripts be in UNIX format, although the python
interpreter seems to work with either format.

Reply via email to