From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8AD1F1381F3 for ; Sat, 13 Apr 2013 15:52:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A76FE0A65; Sat, 13 Apr 2013 15:52:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 84D41E09F2 for ; Sat, 13 Apr 2013 15:52:37 +0000 (UTC) Received: from mail-ia0-x22d.google.com (mail-ia0-x22d.google.com [IPv6:2607:f8b0:4001:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 52E4933DF1D for ; Sat, 13 Apr 2013 15:52:36 +0000 (UTC) Received: by mail-ia0-f173.google.com with SMTP id j5so2702361iaf.32 for ; Sat, 13 Apr 2013 08:52:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=UH4XpqdV8O4ifskdB+hVwMzPTEnSJS430yjQrjzp2mo=; b=JL+JSHBi5voGQv1o/4F369PbjP6+Jam/8d+Sucltj2hDfu6DRxSJtahwStMO12U/PF Q/c0aSREWdJcSP2EGDTxvJ1JZyTCFLYzxcCAmshA0A1WZr7KqBRT0vWiMSK7OuNCe1br KpJnXsi3BqEKq0TV7+khGllzdwhcGSrMa63FMXZscLANMIW8B+unt1KAsa8bZ2j3DX+X WT1dfMCwkz+ObPfyGaf117j8tXbiBAz03mUhr3CemeOG4BmxIiVBzzveBlfmDxorQnlH 13kKRUs+nfQ2/+kT1kwBhaPcWwDkSeyLHcGT3s1Th04AkTNQGr4uSZ4jng4IVry4VBZB WVrA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.50.44.106 with SMTP id d10mr1713398igm.26.1365868354913; Sat, 13 Apr 2013 08:52:34 -0700 (PDT) Received: by 10.64.102.66 with HTTP; Sat, 13 Apr 2013 08:52:34 -0700 (PDT) In-Reply-To: <1365864260-1606-1-git-send-email-mgorny@gentoo.org> References: <1365864260-1606-1-git-send-email-mgorny@gentoo.org> Date: Sat, 13 Apr 2013 11:52:34 -0400 Message-ID: Subject: Re: [gentoo-dev] [PATCH eutils] Support recursive operation in edos2unix. From: Mike Gilbert To: Gentoo Dev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 506e68f5-40a8-4807-a455-fbf67fc38003 X-Archives-Hash: 89e51291b094dcb8f90d1cce24c60626 On Sat, Apr 13, 2013 at 10:44 AM, Micha=C5=82 G=C3=B3rny 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.