Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help
----Next_Part(Thu_Oct_26_13:59:55_2000_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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


----Next_Part(Thu_Oct_26_13:59:55_2000_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

#!/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


----Next_Part(Thu_Oct_26_13:59:55_2000_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

#!/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


----Next_Part(Thu_Oct_26_13:59:55_2000_809)----


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




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