Yes this has been done this way for a while but I had a script that was relying on the flat directories to reduce my bandwidth dependence on downloading from distfiles.gentoo.org. However it has stopped working because of the directory split to 256 directories.
While I knew this would be a problem at some point, now I have to figure out how to replicate this on my personal portage distfiles mirror as I download them (again, since I have more than one box that needs updates, I am hoping I download any particular distfile no more than once.)
So in https://archives.gentoo.org/gentoo-dev/ ... ecae2463ba it provides some very vague declaration of how to compute the directory hash...is there a better plaintext way of computing the subdirectory? As far as I can tell, the distfile name is hashed (what hash was it decided on?) and then some esoteric function added. I was kind of surprised, would have thought if the hash was relatively cryptographically secure (which it doesn't need to be since the intent was solely distribution and not security) one would just need to cut off the first byte of the hash and use that as the directory when converted to hex.
So is there a bash script to generate this 2-hexadecimal digit hash?
tldr: http://distfiles.gentoo.org/distfiles/[b]5a[/b]/qtwebengine-5.15.10_p20230815.tar.xz : what's the algorithm to compute the 5a ?


