NetBSD Problem Report #57192

From www@netbsd.org  Fri Jan 20 20:14:28 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1A5801A9239
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 20 Jan 2023 20:14:28 +0000 (UTC)
Message-Id: <20230120201426.8C3771A923B@mollari.NetBSD.org>
Date: Fri, 20 Jan 2023 20:14:26 +0000 (UTC)
From: campbell+pkgsrc@mumble.net
Reply-To: campbell+pkgsrc@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pkgname clash of lang/tcl and lang/tcl85 confuses pkgin for dependencies
X-Send-Pr-Version: www-1.0

>Number:         57192
>Category:       pkg
>Synopsis:       pkgname clash of lang/tcl and lang/tcl85 confuses pkgin for dependencies
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 20 20:15:00 +0000 2023
>Originator:     Taylor R Campbell
>Release:        pkgsrc-2022Q4
>Organization:
Tcl NetBSD Foundation
>Environment:
look what you've done!  i'm melting, melllllllting...oh, what a world, what a world...
>Description:
Both lang/tcl and lang/tcl85 use `tcl' as PKGBASE:

lang/tcl/Makefile:PKGNAME=      tcl-${TCL_VERSION}
lang/tcl85/Makefile:PKGNAME=    tcl-${TCL_VERSION}

For some reason, when I installed a large batch of packages with pkgin in the new quarterly branch, it chose to install tcl85 -- even though apparently nothing depends on that now that I've installed it, and several things that do depend on tcl>=8.6 now can't be installed:

---Jan 20 15:24:06: installing texlive-collection-basic-2022...
pkg_add: no pkg found for 'tcl>=8.6.1nb1', sorry.
pkg_add: Can't install dependency tcl>=8.6.1nb1
pkg_add: Expected dependency tcl>=8.6.1nb1 still missing
[...]
---Jan 20 15:25:13: installing tcl-8.5.19nb1...
[...]
---Jan 20 19:19:31: installing git-gitk-2.39.0...
pkg_add: no pkg found for 'tcl>=8.6.1nb1', sorry.
pkg_add: Can't install dependency tcl>=8.6.1nb1
pkg_add: Expected dependency tcl>=8.6.1nb1 still missing
pkg_add: Can't install dependency tk>=8.4
pkg_add: Expected dependency tk>=8.4 still missing
pkg_add: 1 package addition failed
---Jan 20 19:19:32: installing tk-8.6.12...
pkg_add: no pkg found for 'tcl>=8.6.1nb1', sorry.
pkg_add: Can't install dependency tcl>=8.6.1nb1
pkg_add: Expected dependency tcl>=8.6.1nb1 still missing
pkg_add: 1 package addition failed

tcl itself was not in the list of package base names I passed to `pkgin in'; it was pulled in strictly as a dependency.

If I `pkgin rm tcl' and then try `pkgin in git-gitk', it still picks the wrong one:

# pkgin in git-gitk
calculating dependencies...done.

3 packages to install:
  git-gitk-2.39.0 tk-8.6.12 tcl-8.5.19nb1

But if I `pkgin rm tcl' and then try `pkgin in tcl', it picks the right version:

# pkgin in tcl
calculating dependencies...done.

1 package to install:
  tcl-8.6.12nb4

If I accept this and then try `pkgin in git-gitk', it finally succeeds at installing git-gitk.

So in the end I can work around this, but it requires nontrivial manual intervention because pkgin seems to pick the wrong dependency.
>How-To-Repeat:
Try to install a large batch of packages including some with (transitive) dependencies on tcl.

pkg_summary, pkgin.db, and pkg_install-err.log available on request, from before I tried installing tcl-8.6 manually and then proceeding.
>Fix:
Yes please!

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.