Subject: Re: proposal 3: flexible extract handling
To: None <>
From: Bernd Salbrechter <>
List: tech-pkg
Date: 05/28/1999 23:05:07
In-Reply-To: <>

On Thu, 27 May 1999 19:13:38 -0400 (EDT) Todd Vierling <> wrote:
> : > Each distfile listed in ${DISTFILES} will be extracted based on file
> : > extension.
> : Will be there a way to nail down the compression and extractions command?
> : Because taking it from the suffix will be a problem in sources from
> : news archives. I found some nice things there (i.e. recipes - a set of roff
> : macros to write cooking recipes.)
> If there's no actual extraction to be done, the file will be copied verbatim
> to ${WRKDIR} unless it is excluded from EXTRACT_ONLY.
> If it's an extension not supported by these rules, simply supply one, or
> exclude the distfile from EXTRACT_ONLY and use post-extract.

You missed the point here in a news archive you will have one
extraction methode, but many suffixes.

The Version from NetBSD-1.3.2 has much logic about WRKDIR, WRKOBJDIR, ...
at extract, I dosen't what to duplicate, but I have looked in your source
(thanks for publishing it) and notice that I can simply
"cd ${WRKDIR} && do my extract" in post-extract. Maybe the old one
was only to complicated there and I missed that fact.

But anyway would it a problem to make the default extraction a variable,
that can be overwritten by a package. This would look as the better way
for me, because it would avoid code duplication.  It will be unlikly that
the suffixes ever conflict with suffixes that identify and extraction
methodes.  They are normaly .<part>of<parts> or simple .<part>, where
<part(s)> are numbers.

> : > EXTRACT_CMD.shar ?=	@DECOMPRESS@ | ${SH}
> : 
> : Wouldn't it make sense to use the GNU sharutils,
> Only in particular cases.  And for those, it may make better sense to use a
> package-specdific `sed' expression.  (Because sharutils would otherwise be
> Yet Another Thing to install in order to build packages.)

Ok I got the point. I thought that it make sense to have the GNU sharutils
in the framework to get the dependeciy to it, if the package need it,
but after looking in your source, this will not work, because it will
normaly only happen in news/mail archives to have some text befor the
archive and then there will be no suffix to trigger that case (see above).

Bernd Salbrechter

PS. I will not be online for the next week, but I will answer
replayes after my vaction.