From owner-freebsd-ports Mon Jun 22 15:43:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA11477 for freebsd-ports-outgoing; Mon, 22 Jun 1998 15:43:32 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from rrzs2.rz.uni-regensburg.de (rrzs2.rz.uni-regensburg.de [132.199.1.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA11451 for ; Mon, 22 Jun 1998 15:43:24 -0700 (PDT) (envelope-from hubert.feyrer@rrzc1.rz.uni-regensburg.de) Received: from rrzc1.rz.uni-regensburg.de (rrzc6.rz.uni-regensburg.de [132.199.3.65]) by rrzs2.rz.uni-regensburg.de (8.8.8/8.8.8) with SMTP id AAA00578; Tue, 23 Jun 1998 00:43:19 +0200 (MET DST) Date: Tue, 23 Jun 1998 00:43:32 +0200 (MET DST) From: Hubert Feyrer X-Sender: feh39068@rrzc6 To: Stefan Eggers Cc: Hubert Feyrer , Stefan Eggers , ports@FreeBSD.ORG Subject: Re: Size of a port... In-Reply-To: <199806221649.SAA12938@semyam.dinoco.de> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 22 Jun 1998, Stefan Eggers wrote: > How else would you do the package registration (as pkg_add does it) > from the ports collection? Making a package and then a pkg_add? A > little bit expensive and slow. :-) What pkg_add as well as pkg_create do is put a +CONTENTS file into /var/db/pkg/foo-x.y, and that file is where to put the size information. If a pkg is first created (either by "make install" or by a "make package"), pkg_create puts the size information in place (/var/db/pkg/.../+CONTENTS in the case of a "make install" or the corresponding binary package file when taring it up with "make package". pkg_add subsequently extracts that size inforamtion with the +CONTENTS file, and voila, everything is in sync. > Take a look at the process of registering in /usr/share/mk/bsd.port.mk > to find out why this option is necessary for the way I did it. All it does is call pkg_create, so that seemed the right place to me... > If it is a problem I can of course change this to a new line type in > the +CONTENT file. The future will show if it's a problem, but accessing data private to the ports system (i.e. /var/db/pkg/...) instead of some well-defined interface (pkg_info -s) cries for problems anyways; just think of someone setting PKG_DBDIR to something else. > Hm. How about this format: > > 6.8 MByte for crafty-book-large > (depending on > 640 KByte for crafty-16.789 > 100 KByte for libxyz-0.99 > also used by appxyz-1.2, > megamonster-99.123 and > mightybad-0.0) > > One would get to know what this depends on, how large those packages > are and who else uses them. The only problem is how to do it recur- > sively. It will look very, very ugly. :-) Probably. :) I haven't thought about this yet, maybe i'll have some time next week or the century... - Hubert -- Hubert Feyrer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message