Hi, On 29. Jul 2019, at 18:10, Ricardo Wurmus <[email protected]> wrote: > Most build systems inherit from the gnu-build-system, so they’ll get to > reuse the “unpack” phase, which conveniently checks if the source is a > tarball. In the case of Java archives it doesn’t do the right thing, > because it doesn’t know about Jars, so the ant-build-system overrides > that phase, etc. > > Dealing with sources sometimes requires special knowledge and the build > system might be best equipped to employ that knowledge. > > What would you suggest the fetchers implement to guarantee that the > sources will always be of some expected form?
I would suggest that they specify the archive type, and either - repack the archive to a standard format, e.g. .tar.gz (this should then also apply to sources that are local directory trees) - unpack the archive to a directory tree An alternative change that would make the whole setup a bit less confusing would be to factor all the “standard” build system stuff out of gnu-build-system and into a base-build-system that provides source unpacking and phase handling and nothing else. I originally ran into this surprise by basing things on trivial-build-system, getting things to work with a local directory, then seeing that my apparently functioning build system failed once I referred to a git checkout because that packs to a tarball. Robert
