Subject: Re: Faulty PKGWILDCARD breaks show-needs-update
To: Thomas Klausner <wiz@NetBSD.org>
From: Lars Nordlund <lars.nordlund@hem.utfors.se>
List: tech-pkg
Date: 05/31/2005 22:13:59
On Tue, 31 May 2005 14:26:27 +0200
Thomas Klausner <wiz@NetBSD.org> wrote:
> On Sat, May 28, 2005 at 02:03:15AM +0200, Lars Nordlund wrote:
> > I have seen that PKGWILDCARD has the wrong value in some packages. I
> > think they lack a proper PKGNAME definition because the DISTNAME differs
> > from the default name (which is often the name of the directory?), or
> > some variant of that.
> >
> May I recommend using 'pkg_chk -i'?
> It will almost surely be quite a lot faster.
pkg_chk -i requires that I have the packages installed, doesn't it?
> Many of the packages you mention below have a version number in the directory
> name, or -devel attached. Those are fine.
If that is the case, then this will never work:
===> lars@ardbeg:/usr/pkgsrc/chat/xchat2 %make show-needs-update
devel/atk => atk-1.9.1 => needs update to atk-1.10.1
chat/xchat2 => (none) => needs install of xchat-2.4.1nb1
===> lars@ardbeg:/usr/pkgsrc/chat/xchat2 %pkg_info | grep xchat
xchat-2.4.1nb1 X11 (X Window System) IRC client, using the GTK2
toolkit
What this boils down to is the question what the PKGNAME and
PKGWILDCARD variables shall be used for. When you say it is ok because
the different packages are different versions of the same base package,
you are hinting something which goes along the lines of "chat/xchat2 is
providing the xchat service, just like chat/xchat is".
But it is not really like that either:
===> lars@glengoyne:/usr/pkgsrc/chat/xchat %make show-needs-update
x11/gtk => (none) => needs install of gtk+-1.2.10nb8
chat/xchat => xchat-2.4.1nb1 => needs update to xchat-1.8.11nb11
So chat/xchat and chat/xchat2 are not related today. But perhaps they
will be in the future, with the help of some new framework
(PKG_ALTERNATIVES? I have not looked at it yet so I do not know what it
can do).
> Some are strange, like libgsf -- that one looks weird to me.
Well, it looks weird to me too.. Hmm. Something triggered the test to
fail, then. It does not anymore. Perhaps pkgsrc/mk flux. I have done a
few 'cvs up' since then. I will rerun the test without redirection of
stderr.
> Could you perhaps provide a list of ones that have different PKGNAME
> and directory name without an obvious reason? Those would be good
> candidates for renaming...
Sure,
archivers/rar-linux
PKGNAME=rarlinux-3.4.1
PKGWILDCARD=rar-linux-[0-9]*
x11/controlcenter
PKGNAME=control-center-1.4.0.4nb10
PKGWILDCARD=controlcenter-[0-9]*
..and a few others.
Most of the rest seems to have a valid reason behind their directory
names. The real one is taken by the version 1 of the package, or the
DISTFILE has the major revision number in the base of the filename.
Others have strange capitalization. I am not really sure if we should
follow it or not. What if the next release of that package the tar ball
has a slightly different capitalization? Wouldn't that be annoying?
Aha!
---games/gltron---
PKGNAME=gltron-0.70nb2
PKGWILDCARD=gltron-0.70-[0-9]*
DISTNAME=gltron-0.70-source
Look at that beast! The nb2 suffix on the PKGNAME is fooling pkg_admin
in its futile search for matching packages. I installed the package to
show this proof:
===> lars@glengoyne:/usr/pkgsrc/games/gltron %make show-needs-update
x11/gtk => (none) => needs install of gtk+-1.2.10nb8
games/gltron => (none) => needs install of gltron-0.70nb2
===> lars@glengoyne:/usr/pkgsrc/games/gltron %pkg_info | grep gltro
gltron-0.70nb2 3D lightcycle game inspired by the movie Tron
I suppose the fix is to either change the PKGWILDCARD slightly to
handle a possible 'nb[0-9]*' suffix or patch pkg_admin. This will
surely bring down the list of PKGWILDCARD-brokenness packages.
What do you think?
Best regards
Lars Nordlund