Date: Sat, 25 Sep 2010 08:38:24 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Devin Teske <dteske@vicor.com> Cc: Rick Miller <vmiller@hostileadmin.com>, freebsd-questions@freebsd.org, Adam Vande More <amvandemore@gmail.com> Subject: Re: Media Packages Vs. Ports Message-ID: <4C9DA6F0.3000007@infracaninophile.co.uk> In-Reply-To: <1285373457.15590.3.camel@localhost.localdomain> References: <90e6ba4883cb50e1500490c7b441@google.com> <AANLkTinOcvO9RsGAAgF0RXd5SYkWvd%2BUBvwqcxK2CyPc@mail.gmail.com> <AANLkTinn0VPb=G7VyZcL2pO1KwmUPCtjgNxP-aCimwpF@mail.gmail.com> <1285373457.15590.3.camel@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0CC0FC7A1529461ACB9B8D48 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 25/09/2010 01:10:57, Devin Teske wrote: > HINT: If you created the package from the ports tree, you can say "make= > describe" in the package's top-level port directory > (e.g. /usr/ports/pkg_origin/some_pkg). This will produce a line that ca= n > be added to the INDEX file without much modification, if any. Not quite. The make describe output differs from the INDEX entry lines in two important ways: * make describe only includes the immediate dependencies of the port. The INDEX contains the sum, recursively, of the ports dependencies, the dependences of the dependencies, etc. etc. There are some subtleties to do with RUN_DEPENDS or LIB_DEPENDS, compared to BUILD_DEPENDS. * The dependency entries produced in the make describe output are directories in the ports tree, whereas the the INDEX uses the corresponding package names. eg. /usr/ports/www/apache22 vs (at the moment) apache-2.2.16_1 > When sysinstall is in the process of installing the packages, i= t first > makes sure that all the run-dependencies (listed in the INDEX file f= or that > package) are installed. If a package that is listed in the `run-deps= ' field > is not installed, sysinstall installs it before installing the re= quested > package. After installing any dependent packages (recursively), sys= install > then unpacks the requested package and reads its packing-lis= t (the > `+CONTENTS' file within the package tarball). All package depen= dencies > listed inside the package's packing-list MUST be installed before-= hand or > else sysinstall will generate an error. Therefore, all package depen= dencies > that appear in the packing list MUST be present in the `run-deps' f= ield of > the INDEX file. There reverse is not true, however. A dependency may= appear > in the INDEX file and not in the package's packing-list. It's pkg_add(1) that does the dependency chasing in general -- and it doesn't need access to an INDEX file: pkg dependencies are recorded in the pkg file itself, and pkg_add knows how to fetch the dependencies from the same place the original pkg file came from. See pkg_add(1), particulary the description of the '-r' option and the ENVIRONMENT sectio= n. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >=20 > 3. THE FREEBSD INDEX FILE FORMAT >=20 > 3a. FREEBSD-5.2 AND FREEBSD-4.10 OR LOWER >=20 > package|port-origin|install-prefix|comment|port-desc-file|maintai= ner| \=20 > categories|build-deps|run-deps|www-site >=20 > 3b. FREEBSD-5.3 AND FREEBSD-4.11 OR HIGHER >=20 > package|port-origin|install-prefix|comment|port-desc-file|maintai= ner| \=20 > categories|build-deps|run-deps|www-site|unknown|unknown|unknown >=20 > I have never seen the 11th, 12th, or 13th field populated. S= o their > purpose remains unknown. >=20 > 3c. FREEBSD-6.0 OR HIGHER >=20 > package|port-origin|install-prefix|comment|port-desc-file|maintai= ner| \=20 > categories|build-deps|run-deps|www-site|unknown|unknown|unknown|d= isc The unknown fields here are essentially the contents of the following make variables from the port: EXTRACT_DEPENDS PATCH_DEPENDS FETCH_DEPENDS Like the run and build depends, these are expanded to include the sum of all their dependencies. These fields are frequently empty, but they certainly aren't unused: % cut -d '|' -f 11 < INDEX-8 | grep '.' | wc -l 7129 % cut -d '|' -f 12 < INDEX-8 | grep '.' | wc -l 6173 % cut -d '|' -f 13 < INDEX-8 | grep '.' | wc -l 3 (that's out of about 22000 INDEX entries currently) > 6. REFERENCES >=20 > The information in this document is the result of many hours of r= everse- > engineering and testing. Little or no sources on this topic have bee= n found > online. Even when the subject matter was found online, the amo= unt of > information on the topic was anemic. I found the best resource was reading the code of the make-index script, here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/Tools/make_index You can also look at my ports-mgmt/p5-FreeBSD-Portindex programs which have quite a lot of explanatory commenting. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig0CC0FC7A1529461ACB9B8D48 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkydpvcACgkQ8Mjk52CukIx0MwCdHc7kbyJ2ZJY9fqSSHE3vEeqr OuwAn05DPFAqvG1C3BlB2NxBrq2/w4lA =ORiZ -----END PGP SIGNATURE----- --------------enig0CC0FC7A1529461ACB9B8D48--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C9DA6F0.3000007>