Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2002 00:38:45 -0700
From:      Kris Kennaway <kris@obsecurity.org>
To:        Jordan K Hubbard <jkh@queasyweasel.com>
Cc:        Kris Kennaway <kris@obsecurity.org>, Mikhail Teterin <mi+mx@aldan.algebra.com>, arch@FreeBSD.org, jkh@FreeBSD.org
Subject:   Re: pkg-routines ignore the recorded md5 checksums
Message-ID:  <20020831073845.GA74568@xor.obsecurity.org>
In-Reply-To: <049EDAFB-BCB3-11D6-A85D-0003938C7B7E@queasyweasel.com>
References:  <20020831070918.GA72640@xor.obsecurity.org> <049EDAFB-BCB3-11D6-A85D-0003938C7B7E@queasyweasel.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Aug 31, 2002 at 12:26:51AM -0700, Jordan K Hubbard wrote:
> Hysterical Raisins.  We didn't even think of adding md5 checksums until=
=20
> about a year or so after the pkg_install tools were done, and there was=
=20
> concern at that point that adding another @foo directive would create a=
=20
> set of "new packages" which didn't work with the older package tools. =20
> So it was decided to simply make them a special type of comment, which=20
> the previous package tools would simply ignore.  In hindsight, of=20
> course...

Perhaps we should change plist.c to make unrecognised commands
non-fatal, so we can have more flexibility about extending the
commandset in future.

Kris

Untested patch:

Index: usr.sbin/pkg_install/lib/plist.c
=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
RCS file: /usr2/ncvs/src/usr.sbin/pkg_install/lib/plist.c,v
retrieving revision 1.29.2.9
diff -u -r1.29.2.9 plist.c
--- usr.sbin/pkg_install/lib/plist.c	20 Aug 2002 06:35:08 -0000	1.29.2.9
+++ usr.sbin/pkg_install/lib/plist.c	31 Aug 2002 07:37:51 -0000
@@ -276,7 +276,7 @@
 	cmd =3D plist_cmd(pline + 1, &cp);
 	if (cmd =3D=3D FAIL) {
 	    cleanup(0);
-	    errx(2, "%s: bad command '%s'", __func__, pline);
+	    warnx("%s: unknown command '%s' (package tools out of date?)", __func=
__, pline);
 	}
 	if (*cp =3D=3D '\0') {
 	    cp =3D NULL;

--huq684BweRXVnRxX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9cHKEWry0BWjoQKURAl3eAKCnmMJfi6HkCfpC47f+JlAZi2p3jQCg3AcC
iG2lDrxBRivUM5msXcAZFAU=
=SUVo
-----END PGP SIGNATURE-----

--huq684BweRXVnRxX--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020831073845.GA74568>