From owner-freebsd-bugs Mon Jun 22 07:32:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA08651 for freebsd-bugs-outgoing; Mon, 22 Jun 1998 07:32:09 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA08595 for ; Mon, 22 Jun 1998 07:31:45 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA27113; Mon, 22 Jun 1998 07:30:02 -0700 (PDT) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA06764 for ; Mon, 22 Jun 1998 07:23:16 -0700 (PDT) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id QAA07168 for FreeBSD-gnats-submit@freebsd.org; Mon, 22 Jun 1998 16:18:42 +0200 (MET DST) Received: (from seggers@localhost) by semyam.dinoco.de (8.8.8/8.8.8) id OAA03094; Mon, 22 Jun 1998 14:59:51 +0200 (CEST) (envelope-from seggers) Message-Id: <199806221259.OAA03094@semyam.dinoco.de> Date: Mon, 22 Jun 1998 14:59:51 +0200 (CEST) From: Stefan Eggers Reply-To: seggers@semyam.dinoco.de To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: seggers@semyam.dinoco.de X-Send-Pr-Version: 3.2 Subject: bin/7021: Size estimation patches to pkg_* Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7021 >Category: bin >Synopsis: Size estimation patches to pkg_* >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: Mon Jun 22 07:30:02 PDT 1998 >Last-Modified: >Originator: Stefan Eggers >Organization: none >Release: FreeBSD 2.2.6-STABLE i386 >Environment: My 2.2-stable system CVSUped last weekend. The patches are bases on its source. >Description: I added package size estimation to pkg_create which puts another file (named +SIZE) in the resulting tar ball. One can also use the new pkg_create to just estimate this size and put it into some file or to stdout. The new options are -S for giving the name of the file where the size shall be written (also works when actually creating a package) and -z for size estimation only. In pkg_add I had to make a small addition to get the file into the package database under /var/db/pkg. It will be needed by pkg_info to give an idea of how much space a package consumes. pkg_info was changed to give the package size. It currently just outputs the file so it isn't pretty. The number should get read in with *scanf() and written out in KByte with separtors appropriate for the locale, i.e. thousands separator with commas in the US for example. pkg_delete just does the right thing. Not patch needed. The old 2.2-stable pkg_add just ignore +SIZE so one can add the new packages with the old command. The new pkg_add is able to add old packages. So I think they are fully compatible with each other. >How-To-Repeat: Apply the patch and try the new features. >Fix: I will have to upload it to ftp.freebsd.org as it is a bit too large for my taste. If anybody would like to have it via email I will send out individual copies. I think the URL will be: ftp://ftp.FreeBSD.org/pub/FreeBSD/incoming/pkg_size_patches.gz Unless it is used already. I can't check now as I only have Internet from 4:00 p.m. CEST on. :-( >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message