WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] problems with tools/pygrub/setup.py and xen/xm/main.py

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] problems with tools/pygrub/setup.py and xen/xm/main.py
From: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Date: Fri, 21 Oct 2005 19:03:28 +0200
Cc: peter Bier <peter_bier@xxxxxx>
Delivery-date: Fri, 21 Oct 2005 17:00:46 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <loom.20051021T182628-543@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <loom.20051021T182628-543@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Fri, Oct 21, 2005 at 04:47:04PM +0000, peter Bier wrote:
> 
> When making the "unstable" version I got an in "tools". There was a complaint 
> about "cc.has_function" in the following code area in tools/pygrub/setup.py
> 
>     if cc.has_function("ext2fs_open"):
>        ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
>     else :
>        sys.stderr.write ("Warning: older veriosn of e2fsprogs installed ...")
>        sys.stderr.write (" .... " )
>     ext2 = ...
> 
> As workaround I simply deleted the entire if - else construct. Make worked 
> then, but I suppose this is not a really satisfactory solution.

There's a patch for this from Jeremy Katz at
http://bugzilla.xensource.com/bugzilla/attachment.cgi?id=75. Could
someone please commit it?

(Signed-Off-By Jeremy available here:
http://lists.xensource.com/archives/html/xen-devel/2005-10/msg01071.html).

Patch also attached for convenience:

diff -r 7c951e3eb5ab tools/pygrub/setup.py
--- a/tools/pygrub/setup.py     Wed Oct 19 10:53:00 2005
+++ b/tools/pygrub/setup.py     Thu Oct 20 11:48:00 2005
@@ -12,7 +12,7 @@
     ext2defines = []
     cc = new_compiler()
     cc.add_library("ext2fs")
-    if cc.has_function("ext2fs_open2"):
+    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")

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>