Subject: Re: pkg summary file format proposal
To: Jeremy C. Reed <reed@reedmedia.net>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-pkg
Date: 02/05/2006 12:27:20
On Sat, Feb 04, 2006 at 09:14:40PM -0800, Jeremy C. Reed wrote:
> On Sat, 4 Feb 2006, Dieter Baron wrote:
> 
> > Contrary to Jeremy's proposal, I propose the format already used in
> > the +BUILD_INFO and +INSTALLED_INFO files: lines of the form
> > `VARIABLE=value'.
> 
> This sounds good.
> 
> >   To save space, I would like to change the way multi-line values are
> > stored (both in the summary and the +{BUILD,INSTALLED}_INFO files).
> > They are currently stored as multiple lines:
> > 
> > REQUIRES=/usr/pkg/lib/libjpeg.so.62
> > REQUIRES=/usr/pkg/lib/libpng.so.3
> > 
> > while I would like to have continuation lines start with a single tab
> > character:
> > 
> > REQUIRES=/usr/pkg/lib/libjpeg.so.62
> > 	/usr/pkg/lib/libpng.so.3
> 
> I like being able to do a simple grep to get thie information. I don't 
> think much space is used up.

  I'll create a file in both versions and see how much difference it
makes, compressed and uncompressed.

> > PKGNAME		apache-1.3.34		name and version of package
> 
> Would that be a delimiter to separate the data also?

  Sorry, I forgot to say that: packages are separated by blank lines.

  Also, a file format version would be good.  We could add a paragraph
at the top of the file with variables describing the file as a whole,
something like:

FORMAT_VERSION=1.0
CREATION_DATE=20060203
PKGSRC_BRANCH=2005Q4


> > REQUIRES	/usr/pkg/lib/libexpat.so.1	needed shared library
> 
> And also include non-pkgsrc shared libraries required also. (pkg_add could 
> warn.)

  I'll simply include all REQUIRES lines from +BUILD_INFO

> > and maybe also:
> > 
> > variable name	example			description
> > ------------------------------------------------------------------------
> > SIZE_PKG	1768565			installed size
> > OPSYS		NetBSD			OS package was compiled on
> > OS_VERSION	2.0.2			version OS package was compiled on
> > MACHINE_ARCH	i386			architecture package was compiled on
> > OBJECT_FMT	ELF			object format package uses
> 
> Yes, for all of those.

  Okay.

> > 	pkg_info -C *.tgz | gzip -9 > pkg_summary.txt.gz
> 
> Looks good. I assume that the arguments could be package names installed 
> too in addition to binary package files like pkg_info already works 
> like. 

  Yes, that is the intention.

					yours,
					dillo