Open the-maldridge opened 4 years ago
With a current version of the distri executable, I can’t reproduce this:
When I run distri batch
, it complains instead of panicing:
% distri batch
2020/03/14 19:46:46 distriroot "/root/distri"
batch: open /root/distri/pkgs: no such file or directory
When I set DISTRIROOT, a batch build works (e.g. DISTRIROOT=$HOME/thedistri distri batch
)
I'm trying to do a batch build of everything from scratch to get a feel for how the build process works, and right now it seems like distri does a hard coded check for its source tree at ~/distri. This is all good and well, but there really doesn't appear to be any error checking around this so a segfault occurs when the source archive is located anywhere else.
I'm happy to debug further, but I'm having trouble figuring out where certain values get initialized. I think that whatever is supposed to provide s.g.Nodes() on line 325 of batch.go isn't handling the bad directory correctly.