From: Muli Ben-Yehuda Subject: [PATCH] only one python2.2 pygrub patch needed [was Re: Re: [Xen-changelog] Tweak to pygrub build config detection.] Date: Sat, 22 Oct 2005 07:44:15 +0200 Message-ID: <20051022054415.GH3229@granada.merseine.nu> References: <1129932232.2050.228.camel@bree.local.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: <1129932232.2050.228.camel@bree.local.net> Content-disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Katz Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Oct 21, 2005 at 06:03:51PM -0400, Jeremy Katz wrote: > On Fri, 2005-10-21 at 18:54 +0000, Xen patchbot -unstable wrote: > > # HG changeset patch > > # User kaf24@firebug.cl.cam.ac.uk > > # Node ID 8eaaa622db81393ef0eae497090c34c04adf4212 > > # Parent 3eee5653f08b01a310e0a9172a6c0149f16217df > > Tweak to pygrub build config detection. > > Signed-off-by: Jeremy Katz > > Applying both patches for this is overkill.... ;) Indeed. Here's a patch to only kill it once. Two patches were applied to pygrub's setup.py to work around python2.2 limitations and only one is needed. Revert one of them. Signed-Off-By: Muli Ben-Yehuda diff -r 17a9f111fa93b38b28bc8679ee8d35b45b7627bc -r 89dbd4ccbd6faa7bcf8845869ea5c34dcdf2acd7 tools/pygrub/setup.py --- a/tools/pygrub/setup.py Fri Oct 21 17:51:42 2005 +++ b/tools/pygrub/setup.py Sat Oct 22 05:40:29 2005 @@ -12,14 +12,11 @@ ext2defines = [] cc = new_compiler() cc.add_library("ext2fs") - try: - if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"): - ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) - else: - sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") - sys.stderr.write(" disk support for ext2.\n") - except AttributeError: - pass + if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"): + ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) + else: + sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") + sys.stderr.write(" disk support for ext2.\n") ext2 = Extension("grub.fsys.ext2._pyext2", extra_compile_args = extra_compile_args, -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/