[MacPorts] #66499: Significantly reduce MacPorts base install space by removing base.tar and compressing ports.tar

MacPorts noreply at macports.org
Sun Dec 18 10:09:38 UTC 2022


#66499: Significantly reduce MacPorts base install space by removing base.tar and
compressing ports.tar
-------------------------+--------------------
 Reporter:  esbugz       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:  2.8.0
 Keywords:               |       Port:
-------------------------+--------------------
 While comparing MacPorts to Homebrew I've noticed that in some respect
 it's even worse in its installation size despite having an architectural
 advantage of not relying on a repo with a history (though Homebrew is
 currently even better in allowing skipping the repos altogether with
 ''HOMEBREW_INSTALL_FROM_API'')

 The **base.tar** and **ports.tar** files are
   - ~215m uncompressed (~113m base and 101m ports) and only
   - ~35m compressed (~15 and ~21 respectively), which is a 80% savings!!!

 So here is an easy win — just compress the files instead of downloading
 the uncompressed versions!

 But then what's even worse is that these files remain even after being
 unpacked, which is another source of wasted space

 1. **Base.tar** should just be removed after being unpacked. And the
 unpacked version has way too many large ''tests'' and ''idoc'' folders to
 be pushed to every single MacPorts install

 2. And the better way to deal with **ports.tar** is: instead of having a
 gazillion of unpacked text files (with some taking as much as 1m per
 port!) that you'll mostly never need (because you'd install only a handful
 of ports) occupying ~170m to use a few compressed database files of ~21m
 or at least a single compressed file per port (just like Yarn package
 manager does with its modern PnP ZIP APIs) and then read those compressed
 files having them unpacked on a hard drive

 Or maybe there is a way to just go the ''HOMEBREW_INSTALL_FROM_API'' way
 and read the port manifests the same way you install the apps by
 downloading the file from https://packages.macports.org/app_name

 Then ideally the whole MacPorts install could be a couple of dozen Mbs
 instead of taking half a Gigabyte!

-- 
Ticket URL: <https://trac.macports.org/ticket/66499>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list