Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2000 04:06:46 -0800 (PST)
From:      asami@FreeBSD.org (Satoshi - Ports Wraith - Asami)
To:        sobomax@FreeBSD.org
Cc:        bmah@FreeBSD.org, nbm@mithrandr.moria.org, knu@idaemons.org, freebsd-ports@FreeBSD.org, will@FreeBSD.org
Subject:   Re: PROPOSAL: Use @comment PLIST variable to track where installed packages came from [Was: Enhancement of pkg_version's version comparison routine]
Message-ID:  <200011301206.eAUC6ko84206@silvia.hip.berkeley.edu>
In-Reply-To: <39F83E4D.AB979DF0@FreeBSD.org> (message from Maxim Sobolev on Thu, 26 Oct 2000 17:23:09 %2B0300)
References:  <86k8by6eis.wl@archon.local.idaemons.org> <20000927002401.A73341@mithrandr.moria.org> <39D9D006.652DC258@FreeBSD.org> <20001003161027.B67542@mithrandr.moria.org> <39D9EE01.7A880665@FreeBSD.org> <200010031657.e93Gvtg10718@bmah-freebsd-0.cisco.com> <39DB17BB.12805565@FreeBSD.org> <200010060426.e964Qvx70814@bmah-freebsd-0.cisco.com> <39DE1A48.C7C8C9CF@FreeBSD.org> <vqc8zrx8nlp.fsf_-_@silvia.hip.berkeley.edu> <39E84F54.257664E5@FreeBSD.org> <39ED7741.BE909115@FreeBSD.org> <39EFEACA.F6215581@FreeBSD.org> <vqc8zrkkn9a.fsf@bubble.hip.berkeley.edu> <39F3E490.33CCCC61@FreeBSD.org> <200010251737.e9PHb0389114@bmah-freebsd-0.cisco.com> <39F71CD6.C7B5C8A9@FreeBSD.org> <200010251856.e9PIugC91054@bmah-freebsd-0.cisco.com> <39F83E4D.AB979DF0@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Maxim and gang,

 * From: Maxim Sobolev <sobomax@FreeBSD.org>

Sorry for taking so long.  Here is my proposed patch.  I'll first
quote the last one I got from Maxim so you can compare.

 * With this message I attaching what is supposed to be a "latest version" of my patch.
 * 
 * -Maxim

 * --------------7E7AC84E84CDA334197F7933
 * Content-Type: text/plain; charset=koi8-r;
 *  name="bsd.port.mk-origin.patch"
 * Content-Transfer-Encoding: 7bit
 * Content-Disposition: inline;
 *  filename="bsd.port.mk-origin.patch"
 * 
 * --- bsd.port.mk.orig	Thu Oct 26 17:14:32 2000
 * +++ bsd.port.mk	Thu Oct 26 17:19:36 2000
 * @@ -1026,6 +1026,17 @@
 *  PKGREQ?=		${PKGDIR}/pkg-req
 *  PKGMESSAGE?=	${PKGDIR}/pkg-message
 *  
 * +BASENAME?=	/usr/bin/basename
 * +
 * +.if ${OSVERSION} > 500012
 * +.for _CATEGORY in ${CATEGORIES}
 * +PKGCATEGORY?=	${_CATEGORY}
 * +.endfor
 * +_PORTDIRNAME!=	${BASENAME} ${.CURDIR}
 * +PORTDIRNAME?=	${_PORTDIRNAME}
 * +PKGORIGIN?=		${PKGCATEGORY}/${PORTDIRNAME}
 * +.endif
 * +
 *  TMPPLIST?=	${WRKDIR}/.PLIST.mktmp
 *  
 *  PKG_CMD?=		/usr/sbin/pkg_create
 * @@ -1048,6 +1059,9 @@
 *  .if !defined(NO_MTREE)
 *  PKG_ARGS+=		-m ${MTREE_FILE}
 *  .endif
 * +.if defined(PKGORIGIN) && ${OSVERSION} > 500012
 * +PKG_ARGS+=		-o ${PKGORIGIN}
 * +.endif
 *  .endif
 *  .if defined(PKG_NOCOMPRESS)
 *  PKG_SUFX?=		.tar
 * @@ -1067,7 +1081,6 @@
 *  .endif
 *  
 *  AWK?=		/usr/bin/awk
 * -BASENAME?=	/usr/bin/basename
 *  CAT?=		/bin/cat
 *  CHMOD?=		/bin/chmod
 *  CHOWN?=		/usr/sbin/chown
 * 
 * --------------7E7AC84E84CDA334197F7933--

===
Index: bsd.port.mk
===================================================================
RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.360
diff -u -r1.360 bsd.port.mk
--- bsd.port.mk	2000/11/16 13:06:25	1.360
+++ bsd.port.mk	2000/11/30 12:00:00
@@ -1046,6 +1046,15 @@
 
 TMPPLIST?=	${WRKDIR}/.PLIST.mktmp
 
+.if ${OSVERSION} >= 400000
+.for _CATEGORY in ${CATEGORIES}
+PKGCATEGORY?=	${_CATEGORY}
+.endfor
+_PORTDIRNAME!=	${BASENAME} ${.CURDIR}
+PORTDIRNAME?=	${_PORTDIRNAME}
+PKGORIGIN?=		${PKGCATEGORY}/${PORTDIRNAME}
+.endif
+
 PKG_CMD?=		/usr/sbin/pkg_create
 PKG_DELETE?=	/usr/sbin/pkg_delete
 PKG_INFO?=		/usr/sbin/pkg_info
@@ -1066,6 +1075,9 @@
 .if !defined(NO_MTREE)
 PKG_ARGS+=		-m ${MTREE_FILE}
 .endif
+.if defined(PKGORIGIN)
+PKG_ARGS+=		-o ${PKGORIGIN}
+.endif
 .endif
 .if defined(PKG_NOCOMPRESS)
 PKG_SUFX?=		.tar
@@ -1382,7 +1394,7 @@
 
 .if ${OSVERSION} >= 300000
 # You need an upgrade kit or make world newer than this
-BSDPORTMKVERSION=	20000201
+BSDPORTMKVERSION=	20001103
 .if exists(/var/db/port.mkversion)
 VERSIONFILE=	/var/db/port.mkversion
 .else
===

I noticed you didn't merge the changes back to 3-stable (actually, you
should) so I put in a check for 4.0 and higher.  I took out the test
from the PKG_ARGS part since PKGORIGIN won't be set if the earlier
test fails.

The merge to 4-stable was on October 31 so a port.mkversion of
November 3rd should pretty much cover the worst possible mirror delay.

Satoshi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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