ports/151775: [PATCH] www/node: [SUMMARIZE CHANGES]

Thinker K.F. Li thinker at codemud.net
Wed Oct 27 11:40:08 UTC 2010


>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 at 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:



More information about the freebsd-ports-bugs mailing list