Date: Sun, 3 Sep 1995 01:19:30 -0400 From: neild@rpi.edu To: FreeBSD-gnats-submit@freebsd.org Subject: bin/718: Minor bug in pkg_add. Message-ID: <199509030519.BAA64470@magritte.its.rpi.edu> Resent-Message-ID: <199509030520.WAA06993@freefall.FreeBSD.org>
next in thread | raw e-mail | index | archive | help
>Number: 718 >Category: bin >Synopsis: pkg_add incorrectly prints an error message >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 2 22:20:00 PDT 1995 >Last-Modified: >Originator: Damien Neil >Organization: Case Western Reserve University >Release: FreeBSD 2.0-BUILT-19950603 i386 >Environment: >Description: When pkg_add discovers that it has insufficient temp space to unpack a package, it displays an error message. This error message is not printed correctly. It appears as: Projected size of 24276116 exceeds free space in (null). Not extracting /usr/home/damien/pkg_install/../emacs-19.28.tgz, sorry! Clearly, the `(null)' is incorrect; it is intented to be the name of the temp directory being used. >How-To-Repeat: Invoke pkg_add on a packate, with a temp directory that does not contain sufficient space to unpack the package. In my case, simply running $ /usr/sbin/pkg_add emacs-19.28.tgz produces the error. >Fix: Apply the patch attached below in the .../src/usr.sbin/pkg_install/ directory. Note that there are two separate bugs, either of which alone will produce the incorrect behavior. --- add/perform-old.c Sat Sep 2 21:49:03 1995 +++ add/perform.c Sat Sep 2 21:50:15 1995 @@ -165,7 +165,8 @@ } } else - where_to = PlayPen; + where_to = where_playpen(); + /* * Apply a crude heuristic to see how much space the package will * take up once it's unpacked. I've noticed that most packages @@ -178,7 +179,7 @@ if (min_free(where_to) < sb.st_size * 4) { whinge("Projected size of %d exceeds free space in %s.", - sb.st_size * 4, where_to); + (int)sb.st_size * 4, where_to); whinge("Not extracting %s, sorry!", pkg_fullname); goto bomb; } >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509030519.BAA64470>