From e875ec25245337bb647ed76988d625986cb1ee71 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Aug 2010 16:08:02 +0000 Subject: [PATCH] * Make sure that if pathsToLink contains an element such as "/share/info" that it doesn't match "/share/information.nix". svn path=/nixpkgs/trunk/; revision=23059 --- pkgs/build-support/buildenv/builder.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/buildenv/builder.pl b/pkgs/build-support/buildenv/builder.pl index a181d72ab83..cdd65cbc523 100755 --- a/pkgs/build-support/buildenv/builder.pl +++ b/pkgs/build-support/buildenv/builder.pl @@ -17,7 +17,10 @@ sub isInPathsToLink { my $path = shift; $path = "/" if $path eq ""; foreach my $elem (@pathsToLink) { - return 1 if substr($path, 0, length($elem)) eq $elem; + return 1 if + $elem eq "/" || + (substr($path, 0, length($elem)) eq $elem + && (($path eq $elem) || (substr($path, length($elem), 1) eq "/"))); } return 0; }