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 1PmuUB-0007FO-Pz for garchives@archives.gentoo.org; Tue, 08 Feb 2011 20:48:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA593E058A; Tue, 8 Feb 2011 20:48:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AC776E058A for ; Tue, 8 Feb 2011 20:48:09 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D45A1B408A for ; Tue, 8 Feb 2011 20:48:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id AA8498006A for ; Tue, 8 Feb 2011 20:48:08 +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: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/cache/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/cache/ebuild_xattr.py X-VCS-Directories: pym/portage/cache/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: bba4f8075c9d5456917955adc819944c49b62d1a Date: Tue, 8 Feb 2011 20:48:08 +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: X-Archives-Hash: beac0ba3dce3ee33fa533bd67522a053 commit: bba4f8075c9d5456917955adc819944c49b62d1a Author: Zac Medico gentoo org> AuthorDate: Tue Feb 8 06:35:14 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Feb 8 20:45:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dbba4f807 cache.ebuild_xattr: don't import ENODATA globally ENODATA is undefined on FreeBSD. This will fix bug #354057. --- pym/portage/cache/ebuild_xattr.py | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pym/portage/cache/ebuild_xattr.py b/pym/portage/cache/ebuild= _xattr.py index 1d7e26f..6b388fa 100644 --- a/pym/portage/cache/ebuild_xattr.py +++ b/pym/portage/cache/ebuild_xattr.py @@ -4,6 +4,8 @@ =20 __all__ =3D ['database'] =20 +import errno + import portage from portage.cache import fs_template from portage.versions import catsplit @@ -11,7 +13,6 @@ from portage import cpv_getkey from portage import os from portage import _encodings from portage import _unicode_decode -from errno import ENODATA,ENOSPC,E2BIG portage.proxy.lazyimport.lazyimport(globals(), 'xattr') =20 @@ -58,16 +59,16 @@ class database(fs_template.FsBased): except IOError as e: # ext based give wrong errno # http://bugzilla.kernel.org/show_bug.cgi?id=3D12793 - if e.errno in (E2BIG,ENOSPC): + if e.errno in (errno.E2BIG, errno.ENOSPC): result =3D len(s)-100 else: - raise e + raise =20 try: self.__remove(path,'test_max') except IOError as e: - if e.errno is not ENODATA: - raise e + if e.errno !=3D errno.ENODATA: + raise =20 return result =20 @@ -87,7 +88,7 @@ class database(fs_template.FsBased): try: return xattr.get(path,key,namespace=3Dself.ns) except IOError as e: - if not default is None and ENODATA =3D=3D e.errno: + if not default is None and errno.ENODATA =3D=3D e.errno: return default else: raise NoValueException()