HEADS UP: RFC: Alternate ports fix for users of older FreeBSD

Joe Marcus Clarke marcus at FreeBSD.org
Sun Jul 27 12:26:30 PDT 2003


For those of you running older versions of FreeBSD ( < 4.7), here is an
alternate fix for the recent port install problem people were seeing. 
This fix involves adding a new port, pkg_install, which is a snapshot of
the -CURRENT pkg_install code.  This port can change periodically as new
pkg_* features are added that bsd.port.mk depends on.

I am looking for testers to make sure this works where it needs to.  So,
if you're running FreeBSD 4.x < 4.7, please give this a shot.  To apply
this fix, do:

# cd /usr/ports/sysutils
# sh /path/to/pkg_install.sh
# cd /usr/ports
# patch -p < /path/to/bsd.port.mk.diff

Then try to install some ports.  If you really want to make sure
everything is good, you'll back out the bsd.port.mk patches Kris
committed last night, then apply this fix.

Using this method, we are free to take advantage of more powerful pkg_*
features without the risk of breaking older (yet unsupported) versions
of FreeBSD.  This fix represents work done by Oliver Eikemeier
<eikemeier at fillmore-labs.com> in ports/54478.

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team	::	marcus at FreeBSD.org
gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

-------------- next part --------------
--- Mk/bsd.port.mk.orig	Sun Jul 27 14:30:02 2003
+++ Mk/bsd.port.mk	Sun Jul 27 14:29:53 2003
@@ -1690,10 +1690,19 @@
 PKGORIGIN?=		${PKGCATEGORY}/${PORTDIRNAME}
 .endif
 
+.if ${OSVERSION} < 460102 && ${PKGORIGIN} != "sysutils/pkg_install" \
+	&& exists(${LOCALBASE}/sbin/pkg_info)
+BUILD_DEPENDS+=	${LOCALBASE}/sbin/pkg_info:${PORTSDIR}/sysutils/pkg_install
+PKG_CMD?=		${LOCALBASE}/sbin/pkg_create
+PKG_ADD?=		${LOCALBASE}/sbin/pkg_add
+PKG_DELETE?=	${LOCALBASE}/sbin/pkg_delete
+PKG_INFO?=		${LOCALBASE}/sbin/pkg_info
+.else
 PKG_CMD?=		/usr/sbin/pkg_create
-PKG_ADD?=	/usr/sbin/pkg_add
+PKG_ADD?=		/usr/sbin/pkg_add
 PKG_DELETE?=	/usr/sbin/pkg_delete
 PKG_INFO?=		/usr/sbin/pkg_info
+.endif
 
 # Does the pkg_create tool support conflict checking?
 PKGINSTALLVER!= ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.*: //'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030727/bc935a24/attachment.bin


More information about the freebsd-ports mailing list