Hi,
On Mon, Jun 26, 2000 at 12:30:09PM +0200, Sheldon Hearn wrote:
> Argh, yet another pkg_* command that looks (at first glance anyway) like
> it should have been implemented as a feature enhancement to the existing
> pkg_* tools.
>
> What is it that makes this unsuitable for incorporation into the
> existing tools?
I thought about doing it within pkg_info, but it would mean changing the
logic flow there a lot. Basically, pkg_info takes package names on the
command line, and itterates over them. pkg_which takes file names, and
(will) itterate over them. Also, pkg_which always operates on all of
the installed packages, and never on packages which it must obtain via
FTP. I don't see any reason to check a subset of packages, or to check
packages which have not been installed.
I've yet to implement a few features, one being support for multiple
files (not difficult once things work for one). With this I can do
things like:
CHK_PLIST=`cat ${PLIST} | sed -e '/^@/d' -e 's#^#${PREFIX}#'`
CONFLICTING_PACKAGES=`pkg_which ${CHK_PLIST}`
if [ -n ${CONFLICT_PACKAGES} ]; then
${ECHO_MSG} "WARNING: This port will overwrite existing " \
"files installed by the following package(s): " \
${CONFLICTING_PACAKGES}
fi
in bsd.port.mk.
I also want to move most of the core logic into the pkg_install library,
so that I can use it for pkg_add. My next task is an extension to
pkg_add which will make it's dependency mechanism work like that for
ports. It will look like this in the PLIST (to preserve compatability):
@pkgdep glib-1.2.8
@comment libdep:glib12.3
Which I can add magic processing for into pkg_add, which will check for
the existance of glib12.3 (via pkg_which -l) and work out that it might
rather depend on an installed glib-1.2.7. Also, pkg_upgrade is going to
need to know why packages depend on one another.
Regards,
-Jeremy
--
FreeBSD - Because the best things in life are free...
http://www.freebsd.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message