buildenv: support very long paths

This commit is contained in:
Nikolay Amiantov
2015-10-22 15:35:39 +03:00
parent 7fb7fafe0f
commit d49140f3e4
2 changed files with 19 additions and 7 deletions
+11 -1
View File
@@ -117,10 +117,20 @@ sub addPkg {
}
}
# Read packages list.
my $pkgs;
if (exists $ENV{"pkgsPath"}) {
open FILE, $ENV{"pkgsPath"};
$pkgs = <FILE>;
close FILE;
} else {
$pkgs = $ENV{"pkgs"}
}
# Symlink to the packages that have been installed explicitly by the
# user.
for my $pkg (@{decode_json $ENV{"pkgs"}}) {
for my $pkg (@{decode_json $pkgs}) {
for my $path (@{$pkg->{paths}}) {
addPkg($path, $ENV{"ignoreCollisions"} eq "1", $pkg->{priority}) if -e $path;
}