Subject: bug in name matching for package?
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.aug.zwei@onlinehome.de>
List: tech-pkg
Date: 08/27/2002 14:23:00
Hi,

I have encountered the following behaviour (NetBSD 1.5.2, pkg_delete -V
says 20020402):

The package depends on procmail like this
   DEPENDS+=               procmail:../../mail/procmail

procmail-3.22 is detected at build time but then it gets a bit
inconsistent:

  $ make package
  ...
  ===> Required installed package procmail: procmail-3.22 found
  ...
  p5-Mail-SpamAssassin-2.40 requires installed package procmail-3.22
  ...
  Registering depends: ...  perl>=5.6.0 procmail.
                                               ^^^^^ something's missing

  $ pkg_info -n /usr/pkgsrc/packages/mail/p5-Mail-SpamAssassin-2.40.tgz
  ...
  Requires:
  ...
  procmail
         ^^^^ same here

  $ cat /var/db/pkg/procmail-3.22/+REQUIRED_BY
  p5-Mail-SpamAssassin-2.40

  $ pkg_delete -v p5-Mail-SpamAssassin
  ...
  Attempting to remove dependency on package `procmail'
                                                     ^^^^ same here

  $ cat /var/db/pkg/procmail-3.22/+REQUIRED_BY
  p5-Mail-SpamAssassin-2.40


I can get around this by using procmail-[0-9]* in the DEPENDS line but
to me this was not obvious enough and it _seemed_ to work without.

What is the canonical way to depend on a package regardless of the
version number?
If '-[0-9]*' is _required_, the omission of the wildcard (or concrete
version number) should trigger an error or at least 'pkglint' should
complain, IMHO. Otherwise, there is some bug lurking in the package
tools.

ciao
     Klaus