GitHub: size of remote file is not known

Mathieu Arnold mat at freebsd.org
Tue Jan 5 11:49:55 UTC 2021


On Mon, Jan 04, 2021 at 08:04:32PM -0800, Chris wrote:
> I don't use Github. So I'm not familiar with their service(s).
> But ports using source fetched from them always return:
> size of remote file is not known
> Is it that their servers simply refuse to return size/content-length
> or is this something else?
> I can see where this might turn into a problem for those attempting
> to build ports on a system with limited resources -- especially
> during a meta-port build, and even more so for newcomers.
> 
> Is anyone familiar with why this is so? I'd like to change this.

USE_GITHUB is using a GitHub (and a git) feature to have git-archive(1)
files generated and served on the fly.  So, the server has no idea how
small or large the file will be, as it does not exist yet, so it cannot
report the size to the http client.

Once one is generated it gets cached for a while, so if the file has
been requested not too far back, the server will have it cached and will
know the size, but it only happens for files that are requested
frequently.

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20210105/24e28b1e/attachment.sig>


More information about the freebsd-ports mailing list