Date: Sat, 04 Apr 2009 17:24:29 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Polytropon <freebsd@edvax.de> Cc: User Questions <freebsd-questions@freebsd.org>, Chris Whitehouse <cwhiteh@onetel.com> Subject: Re: new package system proposal Message-ID: <49D789BD.7020103@infracaninophile.co.uk> In-Reply-To: <20090404170401.c0f0bce0.freebsd@edvax.de> References: <49D76B02.4060201@onetel.com> <20090404170401.c0f0bce0.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5D02A2F0F2E5D3424D4F4747 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Polytropon wrote: > Compiling applications in general will lead you into one > main problem: Many ports have different options that need > to be set at compile time. For a set of n options, 2^n > packages would be created, if I consider the WITH_SOMETHING > options only. > One example is mplayer. Its various options select which > codecs to include or if / if not to build with mencoder. > In regards of different national law, it may even be > prohibited to include a several codec, so it needs to > be installed afterwards manually. >=20 > Another example is (you mentioned it) OpenOffice. In the > past, I was happy to do >=20 > # pkg_add -r de-openoffice >=20 > or something similar. Today, I'm happy that someone put > a precompiled package of OpenOffice online and announced > it on the de- mailing list. Hmmm... I was thinking about this the other day. There are two classes of behaviour where OPTIONS functionality could be passed down to the compiled pkg level. The first is where choosing an option /only/ affects the dependency tree for a package. The phpMyAdmin port I maintain is like this: by setting OPTIONS you can avoid installing some php modules -- the phpMyAdmin code automatically detects the presence or absence of those modules and does the right thing automatically. Adding an interactive options menu to provide the same functionality when installing from packages seems to me to be do-able, although I admit to no great expertise at C programming. However, aside from meta- ports, this sort of OPTIONS behaviour is probably fairly unusual in the ports tree. The second case is far more common and far more interesting. This is where toggling an option controls whether some sub-set of files get installed or not, without any changes to other parts of the port. Adding different localizations in many programs, or choosing which out of a set of drivers for different pieces of hardware to install (eg. in print/ghostscript8) are cases in point. Now, one answer to providing the full flexibility of such a port when installed via packages is simply to split up the port into a lot of smaller ports, which reduces the problem to the previous one of using OPTIONS to=20 control the dependency tree. The various different php5 modules are a good example of this sort of approach in practice. The disadvantages are exploding the number of directories within the ports tree, requiring maintainers for all of the newly created tiny little ports and generally increasing the amount of work it takes to maintain everything. Now, one way of alleviating some of the the maintenance burden would be a fairly simple idea I had. At the moment, there's a one-to-one relationship between port directories in the ports tree and the packages installed from them. But that doesn't have to be so: why can't typing 'make install' in a port directory end up installing several different packages? Seems quite feasible to me to install a number of sub-ports as one operation. One final note: there's a degenerate case of this behaviour for virtually= all ports in the tree. When installing from ports, you can set 'NOPORTDOCS' and 'NOPORTEXAMPLES' to avoid installing documentation or examples respectively. When installing from packages you don't get that capability. Having foo-docs-n.nn.nn and foo-examples-n.nn.nn sub-ports would give you that. cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig5D02A2F0F2E5D3424D4F4747 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAknXicMACgkQ8Mjk52CukIwmggCfT4AH2FkkVNiLPkcrYG0NGuo5 4P0An2BLKqUTPFxhebZwgTJgrah3RdH9 =kI1N -----END PGP SIGNATURE----- --------------enig5D02A2F0F2E5D3424D4F4747--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D789BD.7020103>