From owner-freebsd-ports Mon Oct 9 18:57:41 2000 Delivered-To: freebsd-ports@freebsd.org Received: from smtp10.atl.mindspring.net (smtp10.atl.mindspring.net [207.69.200.246]) by hub.freebsd.org (Postfix) with ESMTP id CBC9537B502; Mon, 9 Oct 2000 18:57:36 -0700 (PDT) Received: from silvia.hip.berkeley.edu (sji-ca7-112.ix.netcom.com [209.109.235.112]) by smtp10.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id VAA27965; Mon, 9 Oct 2000 21:57:30 -0400 (EDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.11.0/8.11.0) id e9A1vQH98914; Mon, 9 Oct 2000 18:57:26 -0700 (PDT) (envelope-from asami) To: Maxim Sobolev Cc: bmah@FreeBSD.org, Neil Blakey-Milner , Akinori -Aki- MUSHA , freebsd-ports@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] 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> From: asami@FreeBSD.org (Satoshi - Ports Wraith - Asami) Date: 09 Oct 2000 18:57:22 -0700 In-Reply-To: Maxim Sobolev's message of "Wed, 04 Oct 2000 14:42:52 +0300" Message-ID: Lines: 96 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * From: Maxim Sobolev * Looks fine, thank you Bruce for fast reply. I hope PW will take a look at this thread when he has * finished his NEWLAYOUT efforts and let us know his final word then. :-> Yes, this is exactly what I'm doing now. :) * From: Maxim Sobolev * 2. What is proposed? * * It is proposed to plant into package short information about path of the underlying * port, from which installed packages was generated, in the Ports Tree. Due to the fact * that it is going to change pkg_install tools it is proposed to do it in as less * intrusive way as possible, so the old packages generated by the previous version of * pkg_* tools will work with the new version of tools and vice versa. This defines * usage of @comment PLIST variable for the purpose. This is a very good idea. I've wanted this for years. :) * 3. How it would work? * * When creating package, bsd.port.mk will generate MASTERCATEGORY/PORTDIR string and * feed it to pkg_create. Here MASTERCATEGORY is the first category specified in port's * CATEGORIES and it should coincide with name of corresponding parent directory in the * ports tree. It was defined in such way to properly handle ports installed w/o parent Yes, I think it is correct to make that assumption. (I believe it is documented in the Porter's Handbook as a rule, but if it is not, it should be.) * category directory (for example when you install package from the module received * using `cvs co ...'). pkg_create in turn will prefix it with appropriate @comment * magic and add into +CONTENTS. * Later, when you updated your ports tree and want to check if any new versions of the * installed packages are available, your designated for this purpose tool (pkg_version) * will call pkg_info with an appropriate option for all installed packages, create a * list of packages where origin is defined and check if appropriate ports' makefiles in * /usr/ports are in fact present. Then for all packages which can be handled under a * new scheme the tool will call appropriate `make -V PORTVERSION -f ...' to determine * current version of the package in the Ports Collection. All other packages (for * example old packages w/o origin, third party packages etc.) will be handled using * ports/INDEX. Sounds good. Well, I don't think third party packages will be "handled" all that well using ports/INDEX since they aren't in there (unless the user edited the file manually to put it in :), but I assume you are saying it will just fall back to the old method of using INDEX if the port directory is found, which is of course fine. Same goes for ports that have been repo-copied, but of course this can't be helped. * With this message I'm attaching appropriate patches for pkg_* tools and bsd.port.mk. I'm not capable of reviewing patches to pkg_* tools but on the bsd.port.mk patch: * --- bsd.port.mk.orig Mon Oct 2 09:10:12 2000 * +++ bsd.port.mk Wed Oct 4 10:58:15 2000 * @@ -1070,6 +1070,17 @@ * PKGMESSAGE?= ${PKGDIR}/pkg-message * .endif * * +SED?= /usr/bin/sed * +BASENAME?= /usr/bin/basename I should just move the whole damn section up here. * + * +.if ${OSVERSION} > 500012 Don't worry about the OSVERSION check, I'll make an upgrade kit and bump BSDPORTMKVERSION to make sure people will have the newest pkg_* tools. * +_PKGCATEGORY!= ${ECHO} ${CATEGORIES} | ${SED} -E 's|^ *||g ; s| .*$$||' * +_PORTDIRNAME!= ${BASENAME} ${.CURDIR} I wish we could do these substitutions without having to invoke separate processes though. Will, aren't there ways to do this in make? * +PKGCATEGORY?= ${_PKGCATEGORY} * +PORTDIRNAME?= ${_PORTDIRNAME} * +PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} * +.endif * +.if defined(PKGORIGIN) && ${OSVERSION} > 500012 * +PKG_ARGS+= -o ${PKGORIGIN} * +.endif Same comment re OSVERSION applies here. Satoshi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message