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

[-- Attachment #1 --]
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 
> about a year or so after the pkg_install tools were done, and there was 
> concern at that point that adding another @foo directive would create a 
> set of "new packages" which didn't work with the older package tools.  
> So it was decided to simply make them a special type of comment, which 
> the previous package tools would simply ignore.  In hindsight, of 
> 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
===================================================================
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 = plist_cmd(pline + 1, &cp);
 	if (cmd == 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 == '\0') {
 	    cp = NULL;

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

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

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