Subject: pkg/8219: Conflict check in "pkg_add" is broken
To: None <>
From: Matthias Scheler <>
List: netbsd-bugs
Date: 08/17/1999 17:20:54
>Number:         8219
>Category:       pkg
>Synopsis:       Conflict check in "pkg_add" is broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 17 17:20:01 1999
>Originator:     Matthias Scheler
Matthias Scheler                  
>Release:        990817
System: NetBSD 1.4J NetBSD 1.4J (LYSSA) #0: Tue Aug 17 11:29:45 CEST 1999 i386

The code in "pkg_add" which checks for conflicts during installation creates
too generic patterns:

        if ((s=strrchr(PkgName, '-')) != NULL){
            strcpy(buf, PkgName);

So "foobar-x.y" gets turned into "foobar-*" which will match sub packages
like "foobar-sub-x.y", too.

Try to add e.g. the "teTeX" meta package:

tron@lyssa:/usr/pkgsrc/print/teTeX#pkg_add /src/packages/All/teTeX-1.0.6.tgz
pkg_add: other version 'teTeX-sharesrc-1.0' already installed

None given.