How much is that distfile in the port?

A user recently asked if we could show the size of the port/package. Getting the size of the distfiles is relatively easy. It’s in the distinfo file. For slave ports, we already know the master port, so we get the information from there.

It might also be nice to show the size of the package. But what package? There are different packages for different platforms and architectures. I think that one is a little too hard.

Now, if someone can just create a perl function that will return a hash/array of distfile and size, that would help me a lot!

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

13 thoughts on “How much is that distfile in the port?”

  1. Ok (about the solution being independent).

    How a distfile (as in source for a port) help in finding a port’s package size? Or, is it assumed that package name can be derived from a distfile name? Mind that some ports do not have a distfile like devel/portlint and some may need more than one distfile which may possibly cause the pkg-name to be modified (due to options & such).

    I was thinking that input would be the port origin, and better yet port-name-version string, that will be used to create a query to search FreeBSD ports to find links to the package. Then the package link will be used to get size information from the ftp/web server.

  2. Getting the package size is a totally different approach to the problem. I wanted to start with distfile size because that’s easy to do and is an indication of how much you’re going to need to download. Getting that information from the distinfo file is pretty straight forward. To be complete, and give the user information about how much is going to be downloaded, FreshPorts could then go through the dependencies to find out the size of everything required.

    For package size, this is a different issue. I think the easiest way there is a directory listing, taken from a mirror.

  3. Sorry, I mean the name of the distinfo file, not the name of the distfile.

    By port origin, do you mean ‘sysutils/bacula-server’?

    For what it’s worth, this function won’t get called called for ports without distinfo files (e.g. some slave ports).

    BTW: why do you want the port origin? I think distinfo filename should be enough.

  4. I wanted the port origin (yes like “sysutils/bacula-server”) for the case of slave port. Now that you mention that code will not be called for slave port, i would not be needing it.

    I have finished it which accounted for slave ports; code will need very minor adjustments to reflect the reality (of not being called for slave ports).

    Try it until then from
    FreshPorts-File-Size-Dist-0.01.tar.gz; i will update it later today under different version number.

Leave a Comment

Scroll to Top