Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2012 10:42:43 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        stable@freebsd.org, ed@freebsd.org, rdivacky@freebsd.org, miwi@freebsd.org
Subject:   Re: /usr/bin/unzip not being installed on 8.3-STABLE
Message-ID:  <86bol774zg.fsf@ds4.des.no>
In-Reply-To: <4FC48153.9070204@FreeBSD.org> (Doug Barton's message of "Tue, 29 May 2012 00:57:07 -0700")
References:  <20120526202432.GA265@DataIX.net> <20120528010146.GA40399@DataIX.net> <86r4u4b4u4.fsf@ds4.des.no> <20120528175913.GC10333@DataIX.net> <4FC45234.90307@FreeBSD.org> <86obp7780r.fsf@ds4.des.no> <4FC48153.9070204@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Barton <dougb@FreeBSD.org> writes:
> I saw your followup, and I think you're probably right ... the problem
> is that there are some things in the ports tree that are conditional on
> OSVERSION, so the fact that it works on HEAD and 9 doesn't necessarily
> mean that it will work in 8.

Well, actually, ports will *never* use the base system unzip:

.if defined(USE_ZIP)
EXTRACT_DEPENDS+=3D	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
.endif
[...]
UNZIP_CMD?=3D     ${LOCALBASE}/bin/unzip

I thought they did, but I guess I must have forgotten to submit the
patch I have in my tree:

--- bsd.commands.mk	23 May 2012 08:17:48 -0000	1.11
+++ bsd.commands.mk	25 May 2012 08:32:36 -0000
@@ -89,7 +89,11 @@
 UMOUNT?=3D	/sbin/umount
 UNAME?=3D		/usr/bin/uname
 UNMAKESELF_CMD?=3D	${LOCALBASE}/bin/unmakeself
+.if exists(/usr/bin/unzip)
+UNZIP_CMD?=3D	/usr/bin/unzip
+.else
 UNZIP_CMD?=3D	${LOCALBASE}/bin/unzip
+.endif
 WHICH?=3D		/usr/bin/which
 XARGS?=3D		/usr/bin/xargs
 XMKMF?=3D		${LOCALBASE}/bin/xmkmf -a

which causes the ports tree to *use* the base unzip but does not remove
the dependency on the port; for that, you need something like this:

--- bsd.port.mk	24 May 2012 07:11:40 -0000	1.711
+++ bsd.port.mk	29 May 2012 08:38:43 -0000
@@ -1639,7 +1639,7 @@
=20
 .if defined(PATCHFILES)
 .if ${PATCHFILES:M*.zip}x !=3D x
-PATCH_DEPENDS+=3D		${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
+PATCH_DEPENDS+=3D		unzip:${PORTSDIR}/archivers/unzip
 .endif
 .endif
=20
@@ -1678,7 +1678,7 @@
 .endif
=20
 .if defined(USE_ZIP)
-EXTRACT_DEPENDS+=3D	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
+EXTRACT_DEPENDS+=3D	unzip:${PORTSDIR}/archivers/unzip
 .endif
 .if defined(USE_XZ) && ( (${OSVERSION} >=3D 900000 && ${OSVERSION} < 90001=
2) || ${OSVERSION} < 800505 )
 EXTRACT_DEPENDS+=3D	${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz

It is probably safe to *always* use the base system unzip (i.e. not set
{EXTRACT,PATCH}_DEPENDS at all) on 9.0 and newer, but that would
definitely require an exp run.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86bol774zg.fsf>