Finding port dependants

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Apr 6 06:27:16 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/04/2010 02:04:16, Aiza wrote:
> The ports make file tree is so very large now a days (21491 ports).
> Doing portsnap to download the complete ports system just to install 3
> ports is massive over kill. I have been doing package installs because
> the resources consumed in disk space (inodes used) and no compile time
> is such a time saver. But there are times when ports have no package or
> the package is not up to date. What I am looking for is a method to find
> the dependents and their dependents of the selected port. Then search
> the package system to determine which have no packages. Install all the
> packages and cvs only the make files for the ports lacking packages. I
> have script to fetch only the make files for the selected port.
> 
> So question is, does the ports index which I can download by it's self
> using portsnap contain the info to find all the dependents of a port?

In principle, yes, you should be able to use the INDEX to extract only a
port and its dependencies rather than downloading the whole ports tree.
 Remember you will need the *build* dependencies as well.  Not to
mention everything under /usr/ports/Mk and quite probably everything
with a name in CAPS under /usr/ports.

However, be aware that you will be confined to using just the /default/
port options: if you try and customize things, you'll change the
dependency graph and the standard INDEX won't match any more.

On the whole though, most people don't make any more than a cursory
attempt to implement something like this.  The amount of hassle just
isn't worth it.  The ports tree is not that huge in the grand scheme of
things -- without the distfiles it takes up about half a GB, and about
140,000 files or directories.  That's comparable to what some of the
larger ports (eg. OpenOffice: 1.9GB and 76,000 files once extracted) use
for their sources alone.  If you're running out of inodes that suggests
you didn't create the file system with the standard 4k per inode ratio.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku61DUACgkQ8Mjk52CukIwiUACeP9wGoDlfmCa1PPfm6GAVkJpk
K+kAn0VSl0kWnYAI4HpvQtqsTvq+9rCV
=ME8H
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list