When i try to install a package through apt-get on linux, it shows me the total amount to be downloaded and the space that will be used after install. Is there a way to view this information while using macports on mac os x?
The issue with mac ports is that it will re-invent the wheel when you install a package, ie it will rebuild a dependency instead of using the existing system version (where possible). I've had far better luck with Homebrew however your mileage may vary.
That said, having skimmed over both systems manuals it's not immediately apparent how to check the size of a pending change in either system.
Most package management systems install pre-compiled (“binary”) packages. Under such a system, the process of building the pre-compiled package provides ideal times to capture the “install size” and the “download size” for every package (respectively, just before the built files are “packaged up”, and just after the downloadable package files have been assembled). Both of these numbers can be stored in some sort of list/database so that installation programs can quickly sum them up and tell the user what to expect.
MacPorts is, however, based on source code, not pre-compiled packages. Each package is installed by downloading specified source code and compiling it into the final programs and support files. Technically, they could record the expected size for the source code downloads and provide a “download size”, but they do not. In addition, MacPorts supports variants. These build-time options can dramatically affect the “install size” of any given package (e.g. the
The central MacPorts project could build each port (in every combination of its variants!) (for each architecture!) (on each OS release!) and record each final “install size”, but that would require a huge amount of time and resources.