It would be nice if we could easily switch our precompiled archives from 
bzip2-compressed tarballs (tbz2) to better compression methods as they become 
available. For example, xz-compressed tarballs (txz) would be better today. OS 
X 10.9 Mavericks and later has built-in support for xz compression 
(https://trac.macports.org/ticket/56237) so we could use that to avoid needing 
to use the xz port or needing to bundle a copy of xz 
(https://trac.macports.org/ticket/52000).

Currently, users have to specify what archive type they want for each server 
listed in archive_sites.conf. The default archive_sites.conf fortunately has 
everything commented out, so users get the MacPorts built-in defaults, so we 
could change the behavior in the future and users would automatically get it.

We could remove the compression type setting in archive_sites.conf. (Or there 
could be a new value of the compression type setting that means to do the 
following.) And instead of having an rmd160 file for each archive, have an 
information file which could be encoded in any convenient format such as json 
or plist or whatever we're using for the PortIndex. MacPorts would fetch the 
information file first, and it would contain a field stating the compression 
format (filename extension) for this archive and a field for its rmd160 
signature. From this MacPorts can deduce what archive filename to download. It 
would also give us a place to store any additional information about archives 
that we might want to store in the future.

If that were in place, along with support in base for decompressing xz without 
needing the xz port, then we could begin compressing new archives for 10.9 and 
later with xz without needing to recompress the entire collection of existing 
archives. Over time we can do that as well, of course.


Reply via email to