From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-commits+bounces-387728-garchives=archives.gentoo.org@lists.gentoo.org>) id 1R8anh-0003Ij-EQ for garchives@archives.gentoo.org; Tue, 27 Sep 2011 16:46:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1CF7421C056; Tue, 27 Sep 2011 16:46:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E2B4021C056 for <gentoo-commits@lists.gentoo.org>; Tue, 27 Sep 2011 16:46:19 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 71BDF1B401B for <gentoo-commits@lists.gentoo.org>; Tue, 27 Sep 2011 16:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CCE4280042 for <gentoo-commits@lists.gentoo.org>; Tue, 27 Sep 2011 16:46:18 +0000 (UTC) From: "Zac Medico" <zmedico@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org> Message-ID: <60c7ca4030839a728a5975ee01e28c0330cf33ae.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 60c7ca4030839a728a5975ee01e28c0330cf33ae Date: Tue, 27 Sep 2011 16:46:18 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 72dbeca79823fbd16c6261f2f8f556ef commit: 60c7ca4030839a728a5975ee01e28c0330cf33ae Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Tue Sep 27 16:46:02 2011 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Tue Sep 27 16:46:02 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D60c7ca40 merge: handle \r in file names for bug #384597 --- pym/portage/dbapi/vartree.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index f146ade..a4c54bd 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3279,6 +3279,7 @@ class dblink(object): # the check must be repeated here for binary packages (it's # inexpensive since we call os.walk() here anyway). unicode_errors =3D [] + line_ending_re =3D re.compile('[\n\r]') =20 while True: =20 @@ -3330,7 +3331,7 @@ class dblink(object): =20 relative_path =3D fpath[srcroot_len:] =20 - if "\n" in relative_path: + if line_ending_re.search(relative_path) is not None: paths_with_newlines.append(relative_path) =20 file_mode =3D os.lstat(fpath).st_mode @@ -3353,11 +3354,11 @@ class dblink(object): =20 if paths_with_newlines: msg =3D [] - msg.append(_("This package installs one or more files containing a ne= wline (\\n) character:")) + msg.append(_("This package installs one or more files containing line= ending characters:")) msg.append("") paths_with_newlines.sort() for f in paths_with_newlines: - msg.append("\t/%s" % (f.replace("\n", "\\n"))) + msg.append("\t/%s" % (f.replace("\n", "\\n").replace("\r", "\\r"))) msg.append("") msg.append(_("package %s NOT merged") % self.mycpv) msg.append("")