Date: Tue, 18 Aug 1998 20:46:37 -0500 (CDT) From: Erik E Rantapaa <rantapaa@uswest.net> To: freebsd-bugs@FreeBSD.ORG, freebsd-ports@FreeBSD.ORG Cc: peter@FreeBSD.ORG Subject: rdist-6.1.3 patches Message-ID: <Pine.BSF.3.91.980818200532.24400A-100000@tahiti.oss.uswest.net>
next in thread | raw e-mail | index | archive | help
Hello fellow FreeBSD'ers... I was wondering if anyone using rdist-6.1.3 has gotten rdist to create intermediate directories of destination paths. For example, the distfile: ( a b c ) -> host install /usr/local/bin/; # assume /usr/local/bin doesn't exist will create /usr/local/bin and install b and c, but fail to install a. The same thing happens if the destination is specified with a trailing "/." (i.e. "/usr/local/bin/."). I know I could instead use: ( a b c ) -> host install /usr/local/bin; # no trailing slash but this runs the risk of tripping up on the 'single element list' problem with rdist -- namely, if ( a b c ) is really a computed list and winds up evaluating to a single element, the entire destination directory gets replaced with that single file. Besides, the rdist man page itself recommends using "/." to indicate that a destination path is a directory. I've done some code sleuthing and believe I have come up with the right patch to fix this problem, but I am somewhat surprised that something like this wouldn't have been already noticed. Since I would imagine this to be a quite common use of rdist I'm wondering if there is another preferred way of doing this. The reason why this fails with rdist-6.1.3 (and it seems 6.1.4 also has the same problem) is that rdist doesn't check the return value of mktemp(). Other OS's will always fill in the template string even if the resulting path has intermediate directories missing. FreeBSD, however, returns a truncated template in such a case. -- Erik Rantapaa rantapaa@uswest.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980818200532.24400A-100000>