Skip to contentSkip to conversation

Tweak to pygrub build config detection.

Xen-changelog New Jeremy Katz 2 participants 2 messages Oct 21, 2005 – Oct 22, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Xen patchbot -unstable

# HG changeset patch
# User [email protected]
# Node ID 8eaaa622db81393ef0eae497090c34c04adf4212 # Parent 3eee5653f08b01a310e0a9172a6c0149f16217df Tweak to pygrub build config detection.

Applying both patches for this is overkill.... ;)

Jeremy

#2 lore raw

PATCH 1/1 only one python2.2 pygrub patch needed [was Re: Re: [Xen-changelog] Tweak to pygrub build config detection.]

Quoted 9 lines · Jeremy Katz
Quoted 6 lines · Xen patchbot -unstable

# HG changeset patch
# User [email protected]
# Node ID 8eaaa622db81393ef0eae497090c34c04adf4212 # Parent 3eee5653f08b01a310e0a9172a6c0149f16217df Tweak to pygrub build config detection.

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.

tools/pygrub/setup.py +5 -8
diff -r 17a9f111fa93b38b28bc8679ee8d35b45b7627bc -r 89dbd4ccbd6faa7bcf8845869ea5c34dcdf2acd7 tools/pygrub/setup.py
@@ -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,
Signature · 2 lines
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/