Date: Sun, 9 Jan 2000 13:10:20 -0500 (EST) From: spidey@anarcat.dyndns.org To: FreeBSD-gnats-submit@freebsd.org Subject: bin/16015: Obscure error message in pkg_delete Message-ID: <20000109181020.1B22D1BD2@anarcat.dyndns.org>
next in thread | raw e-mail | index | archive | help
>Number: 16015 >Category: bin >Synopsis: Obscure error message in pkg_delete >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jan 9 13:30:02 PST 2000 >Closed-Date: >Last-Modified: >Originator: Spidey >Release: FreeBSD 3.4-STABLE i386 >Organization: >Environment: Latest stable (28.12.1999). >Description: pkg_delete gives a very strange error message that is too hard to understand. It should be changed to something more descriptive. >How-To-Repeat: The guilty code is the following in /usr/src/usr.sbin/pkg_install/delete/perform.c if (chdir(home) == FAIL) { cleanup(0); errx(2, "Toto! This doesn't look like Kansas anymore!"); } From what I understand, it tries to chdir to the 'home' and exits if it can't. In fact, the 'home' is the directory where the procedure started. ("if (!getcwd(home, FILENAME_MAX))", line 80). The problem is that the message "Toto! This doesn't look like Kansas anymore!" is absolutely weird and doesn't tell what the problem is _at all_. To repeat, you could cd to a directory, pkg_delete a big package, and, while pkg_delete is running, remove the directory where pkg_delete started. >Fix: Suggested patch: *** perform.c Sun Jan 9 13:08:18 2000 --- perform.c.orig Sun Jan 9 13:08:18 2000 *************** *** 169,175 **** if (chdir(home) == FAIL) { cleanup(0); ! errx(2, "Can't chdir() to %s.", home); } if (!Fake) { --- 169,175 ---- if (chdir(home) == FAIL) { cleanup(0); ! errx(2, "Toto! This doesn't look like Kansas anymore!"); } if (!Fake) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000109181020.1B22D1BD2>