Date: Wed, 27 Oct 2010 19:30:36 +0800 (CST) From: "Thinker K.F. Li" <thinker@codemud.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: linpct@gmail.com Subject: ports/151775: [PATCH] www/node: [SUMMARIZE CHANGES] Message-ID: <201010271130.o9RBUaoa016167@eeebox.branda.to> Resent-Message-ID: <201010271140.o9RBe8b1081843@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 151775 >Category: ports >Synopsis: [PATCH] www/node: [SUMMARIZE CHANGES] >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 27 11:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Thinker K.F. Li >Release: FreeBSD 9.0-CURRENT i386 >Organization: >Environment: System: FreeBSD eeebox.branda.to 9.0-CURRENT FreeBSD 9.0-CURRENT #12: Mon Oct 11 18:03:28 CST 2010 >Description: When you build an plugin for nodejs with node-waf, and give different directory for source and build, it maybe fault. node-waf would compute a relative path from build directory to source directory. It works if no symbolic link in the absolute path of build directory. But, it is fault when a symbolic link in the absolute path. For example, for most FreeBSD user, their home directory is in /usr/home/XXXX. But, there is a symbolic link /home to /usr/home. If your home is specified with /home/XXXX and another path is /usr/OOOO, node-waf will get a relative path from /home/XXXX to /usr/OOOO as ../../usr/OOOO. It suppose /home/XXXX/../../ is root directory, but it is actually /usr. So, absolute path of relative path ../../usr/OOOO in /home/XXXX is actually /usr/usr/OOOO, it is different from the expected one; /usr/OOOO. Added file(s): - files/patch-wafadmin-Node.py Port maintainer (linpct@gmail.com) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- node-0.2.4.patch begins here --- diff -ruN --exclude=CVS /usr/ports/www/node/files/patch-wafadmin-Node.py /usr/ports/www/node.new/files/patch-wafadmin-Node.py --- /usr/ports/www/node/files/patch-wafadmin-Node.py 1970-01-01 08:00:00.000000000 +0800 +++ /usr/ports/www/node.new/files/patch-wafadmin-Node.py 2010-10-27 18:30:17.000000000 +0800 @@ -0,0 +1,15 @@ +--- tools/wafadmin/Node.py.orig 2010-10-25 05:45:39.000000000 +0800 ++++ tools/wafadmin/Node.py 2010-10-27 18:30:12.000000000 +0800 +@@ -349,6 +349,12 @@ + if self == from_node: return '.' + if from_node.parent == self: return '..' + ++ from_node_path = from_node.abspath() ++ from_node_realpath = os.path.realpath(from_node_path) ++ if from_node_path != from_node_realpath: ++ from_node = self.__class__.bld.root.find_dir(from_node_realpath) ++ return self.relpath_gen(from_node) ++ + # up_path is '../../../' and down_path is 'dir/subdir/subdir/file' + ancestor = self.find_ancestor(from_node) + lst = [] --- node-0.2.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010271130.o9RBUaoa016167>