extract both bz2 and gz files from distfiles

Pav Lucistnik pav at FreeBSD.org
Mon Aug 7 21:21:04 UTC 2006


Brooks Davis píše v po 07. 08. 2006 v 16:06 -0500:
> On Mon, Aug 07, 2006 at 10:56:18PM +0200, Pav Lucistnik wrote:
> > Boris Samorodov p??e v ?t 08. 08. 2006 v 00:24 +0400:
> > > On Mon, 7 Aug 2006 15:12:03 -0500 Brooks Davis wrote:
> > > > On Mon, Aug 07, 2006 at 11:56:46PM +0400, Boris Samorodov wrote:
> > > > > On Mon, 7 Aug 2006 14:37:25 -0400 Kris Kennaway wrote:
> > > > > > On Mon, Aug 07, 2006 at 03:12:06AM +0400, Boris Samorodov wrote:
> > > > > 
> > > > > > > We have got a port (lang/gnat-gcc34) which has both bz2 and gz
> > > > > > > distfiles. As for 5.x+ extracting is gone automagically. But not at
> > > > > > > 4.x. Well, at 4.x extracting may be done for example, by using
> > > > > > > USE_BZIP2 knob and doing gunzipping at after-extract:.
> > > > > > > 
> > > > > > > Does someone know a better solution?
> > > > > > > Does we have examples at our ports?
> > > > > 
> > > > > > Use a do-extract that extracts all distfiles or EXTRACT_ONLY with
> > > > > > post-extract that extracts the other ones.
> > > > > 
> > > > > Thanks, Kris. I'm trying to test (actually, to find an 4.x system)
> > > > > some broken ports with a patch(es) which includes (thanks Brooks):
> > > > > -----
> > > > > .if ${OSVERSION} < 500000
> > > > > EXTRACT_DEPENDS+=       bsdtar:${PORTSDIR}/archivers/libarchive
> > > > > TAR=            /usr/local/bin/bsdtar
> > > > > .endif
> > > > > -----
> > > > > 
> > > > > To me that seems a good solution.
> > > 
> > > > I'd suggest using not using an absolute path in the TAR definition
> > > > since the dependency check doesn't and using 502111 as the version since
> > > > that's the first version bump after the initial bsdtar import.  Not that
> > > > we really need to worry about such early 5.x release, but it's more
> > > > correct.
> > > 
> > > Thanks again, Brooks. The patch will include (if Kris won't complain):
> > > -----
> > > .if ${OSVERSION} < 502111
> > > EXTRACT_DEPENDS+=       bsdtar:${PORTSDIR}/archivers/libarchive
> > > TAR=            bsdtar
> > > .endif
> > > -----
> > 
> > Would writing own do-extract: target be better alternative?
> 
> It seems list unnecessicary work to me.  The nice thing about setting to
> TAR bsdtar is that you get the same behavior on all releases.  Obviously
> a do-extract target would work, but this way we can get rid of the
> compatability code at some point in the future.  In some ways I think
> we should consider alwasy depending on bsdtar in older versions just to
> eliminate the differences and to reduce cross branch compatability
> issues now that less and less people can test on 4.x systems.

So you prefer imposing yet another dependency on the user is less evil
than adding few lines of extra code in port Makefile?

Interesting PoV.

-- 
Pav Lucistnik <pav at oook.cz>
              <pav at FreeBSD.org>

Alignment: Neutral Greedy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
	=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060807/91cb1247/attachment.pgp


More information about the freebsd-ports mailing list