From owner-freebsd-bugs Sat Sep 2 22:20:01 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id WAA07002 for bugs-outgoing; Sat, 2 Sep 1995 22:20:01 -0700 Received: (from gnats@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id WAA06993 ; Sat, 2 Sep 1995 22:20:01 -0700 Resent-Date: Sat, 2 Sep 1995 22:20:01 -0700 Resent-Message-Id: <199509030520.WAA06993@freefall.FreeBSD.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, neild@rpi.edu Received: from mail1.its.rpi.edu (mail1.its.rpi.edu [128.113.100.7]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id WAA06951 for ; Sat, 2 Sep 1995 22:19:53 -0700 Received: from magritte.its.rpi.edu (magritte.its.rpi.edu [128.113.100.20]) by mail1.its.rpi.edu (8.6.9/8.6.4) with ESMTP id BAA17356 for ; Sun, 3 Sep 1995 01:19:50 -0400 Received: (neild@localhost) by magritte.its.rpi.edu (8.6.9/8.6.4) id BAA64470; Sun, 3 Sep 1995 01:19:30 -0400 Message-Id: <199509030519.BAA64470@magritte.its.rpi.edu> Date: Sun, 3 Sep 1995 01:19:30 -0400 From: neild@rpi.edu Reply-To: neild@rpi.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/718: Minor bug in pkg_add. Sender: bugs-owner@freebsd.org Precedence: bulk >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: