[PATCH] D37099: Added optional validation of svn sources to Dockerfiles.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 11:52:59 PDT 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D37099#852298, @ilya-biryukov wrote:

> In https://reviews.llvm.org/D37099#852251, @mehdi_amini wrote:
>
> > Would this be all obsolete with git repos?
>
>
> I would think so.
>
> > Also all the python code seems complicated to me for what is basically `find | grep -v '/\.git/' | grep -v '/\.svn/' | LC_ALL=C sort | tar -cf - -T - --no-recursion | sha1sum`, can you elaborate why this is needed?
>
> That's roughly what I started with, but's it's more complicated if you want to compute separate checksums for projects inside single tree source checkout (i.e. `llvm`, `llvm/tool/clang`, `llvm/projects/lldb`, etc.).


Well first using a flat layout makes it easier: checkout `clang` next to `llvm` instead of inside `llvm/tools` (and use `-DLLVM_ENABLE_PROJECTS`).
Then it is a matter of wrapping the command I gave in a loop around the directories and producing one entry per project.

> There is also a problem that some files inside LLVM repo use svn substitutions. The substitutions are mostly fine, but `$Date$` and `$LastChangedDate$` are locale-specific and we have to account for that.

OK that's terrible :(

> I totally agree with you, though, the code is quite complicated. Wish it was simpler.

Yeah, like just using git ;)

Anyway I'm fine with adding this, but I won't have time to review deeply the python code right now.


https://reviews.llvm.org/D37099





More information about the llvm-commits mailing list