In some cases, rbm will download files in the wrong project directory
The patch for #27045 (moved) is causing an error when starting the build with an empty out/
directory:
https://trac.torproject.org/projects/tor/ticket/27045#comment:11
We can see in the logs that binutils is being downloaded in the out/firefox
directory instead of out/binutils
:
Saving to: '/media/ssd/Code/Tor/tor-browser-build/out/firefox/binutils-2.26.1.tar.bz2'
The reason is that we override output_dir
when calling build_pkg
in input_files
:
} elsif ($input_file->{project} && $t->('project')) {
my $p = $t->('project');
print "Building project $p - $name\n";
my $run_save = $config->{run};
$config->{run} = { target => $input_file->{target} };
$config->{run}{target} //= $run_save->{target};
build_pkg($p, {%$options, origin_project => $project, %$input_file,
output_dir => $proj_out_dir});
$config->{run} = $run_save;
print "Finished build of project $p - $name\n";
} else {
The reason why we don't see this error in normal builds and only see it with #27045 (moved) is that in #27045 (moved) we are changing the tor-browser
filename to remove c("var/build_id")
from it, removing the need to download dependencies to compute the filename. In normal builds the binutils tarball is already downloaded (in the correct directory) when we start the firefox build, so we are not hitting this issue.