Date: Thu, 26 Oct 2000 14:00:02 +0200 From: Marko Schuetz <marko@kinetic.ki.informatik.uni-frankfurt.de> To: asami@FreeBSD.ORG Cc: jkh@winston.osd.bsdi.com, qa@FreeBSD.ORG Subject: Package conflicts Message-ID: <20001026140002T.marko@kinetic.ki.informatik.uni-frankfurt.de>
index | next in thread | raw e-mail
[-- Attachment #1 --]
I recently noticed an annoying package conflict between libxml-1.8.9
and libxml2-2.1.1. Package siag-3.3.8 depends on libxml2-2.1.1 and
gnofin-0.8.0 depends on libxml-1.8.9. Unfortunately, both libxml are
incompatible: if libxml-1.8.9 overwrites libxml2-2.1.1 then siag will
cease to work and if libxml2-2.1.1 overwrites libxml-1.8.9 then gnofin
ceases to work.
There are two sides to the "package interplay coin": one is
requirement the other is conflict.
There would be several possibilities to address the situation.
1. Each package could have another file stating the packages with
which it conflicts. Pkg_add could refuse to install a package
that conflicts with an already installed package or at least give a
warning.
2. Pkg_add could test for files present before the install that the
package to be installed would overwrite and move them out of the
way. I think this is what NetBSD does, but have not checked.
3. If packages A and B require some other package C, make them require
the same version of C. I know that this means more work for the
maintainers of package A and B, but IMO this effort is well spent.
I think 2. and 3. should be used. Then files that aren't installed via
the package system would not accidentally be overwritten and the
installation of a package would not affect the functionality of other
packages by overwriting files of required packages.
I checked for conflicts in 4.1-RELEASE using the attached scripts. Of
course, one could check for equal MD5 fingerprints and not list files
that have the same fingerprint as conflicts, but I have not done that
yet.
Marko
[-- Attachment #2 --]
#!/bin/sh
TMP=/tmp
PLISTS=${TMP}/PLISTS
PKGS=/var/db/pkg
HERE=`pwd`
[ -d ${PLISTS} ] || mkdir -p ${PLISTS}
if [ "x$1" = "xcd" ] ; then
{
cdmount
PKGS=/cdrom/packages/All
}
fi
cd ${PKGS}
for i in * ; do
pkg_info -L ${i} | tail +4 | uniq >${PLISTS}/${i}
done
cd ${HERE}
if [ "x$1" = "xcd" ] ; then
cdumount
fi
[-- Attachment #3 --]
#!/bin/sh
PLISTS=.
TMP=/tmp
cd ${PLISTS}
ls >${TMP}/Packages
conflict ()
{
TEST=`cat $1 $2 | sort | uniq -d`
if [ "x${TEST}" != "x" ] ; then
{
echo "Packages $1 and $2 conflict"
echo "----"
echo ${TEST}
echo "----"
}
fi
}
while [ -s ${TMP}/Packages ] ; do
{
CURRENT=`head -n 1 ${TMP}/Packages`
tail -n +2 ${TMP}/Packages >${TMP}/__Packages
mv ${TMP}/__Packages ${TMP}/Packages
cat ${TMP}/Packages | (while read i ; do conflict ${CURRENT} ${i} ; done)
} done
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001026140002T.marko>
