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 ) id 1SB98c-0006eH-QS for garchives@archives.gentoo.org; Fri, 23 Mar 2012 18:22:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9C0FE07A7; Fri, 23 Mar 2012 18:22:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 34804E07A7 for ; Fri, 23 Mar 2012 18:22:51 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 965E41B4026 for ; Fri, 23 Mar 2012 18:22:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 59AACE5403 for ; Fri, 23 Mar 2012 18:22:49 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1332526943.c33fe80a46e7ba5046c14c5fae8e6fbb8934cac5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/movefile.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c33fe80a46e7ba5046c14c5fae8e6fbb8934cac5 X-VCS-Branch: master Date: Fri, 23 Mar 2012 18:22:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4d765f65-3a07-4702-974f-50fd5c910871 X-Archives-Hash: 4c4435f30360a323b51a1fb463dd47dc commit: c33fe80a46e7ba5046c14c5fae8e6fbb8934cac5 Author: Zac Medico gentoo org> AuthorDate: Fri Mar 23 18:22:23 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Mar 23 18:22:23 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc33fe80a movefile: clarify message for xattr copy error This will fix bug #402323. --- pym/portage/util/movefile.py | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py index 252f4a2..43f1b33 100644 --- a/pym/portage/util/movefile.py +++ b/pym/portage/util/movefile.py @@ -8,6 +8,7 @@ import os as _os import shutil as _shutil import stat import subprocess +import textwrap =20 import portage from portage import bsd_chflags, _encodings, _os_overrides, _selinux, \ @@ -229,7 +230,18 @@ def movefile(src, dest, newmtime=3DNone, sstat=3DNon= e, mysettings=3DNone, try: # For safety copy then move it over. _copyfile(src_bytes, dest_tmp_bytes) if xattr_enabled: - _copyxattr(src_bytes, dest_tmp_bytes) + try: + _copyxattr(src_bytes, dest_tmp_bytes) + except SystemExit: + raise + except: + msg =3D _("Failed to copy extended attributes. " + "In order to avoid this error, set " + "FEATURES=3D\"-xattr\" in make.conf.") + msg =3D textwrap.wrap(msg, 65) + for line in msg: + writemsg("!!! %s\n" % (line,), noiselevel=3D-1) + raise _apply_stat(sstat, dest_tmp_bytes) _rename(dest_tmp_bytes, dest_bytes) _os.unlink(src_bytes)