Date: 09 Oct 2000 18:57:22 -0700 From: asami@FreeBSD.org (Satoshi - Ports Wraith - Asami) To: Maxim Sobolev <sobomax@FreeBSD.org> Cc: bmah@FreeBSD.org, Neil Blakey-Milner <nbm@mithrandr.moria.org>, Akinori -Aki- MUSHA <knu@idaemons.org>, 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] Message-ID: <vqc8zrx8nlp.fsf_-_@silvia.hip.berkeley.edu> In-Reply-To: Maxim Sobolev's message of "Wed, 04 Oct 2000 14:42:52 %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>
next in thread | previous in thread | raw e-mail | index | archive | help
* From: Maxim Sobolev <sobomax@FreeBSD.org> * 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 <sobomax@FreeBSD.org> * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqc8zrx8nlp.fsf_-_>