NetBSD Problem Report #57206

From www@netbsd.org  Tue Jan 31 01:50:03 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 CC7C01A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Jan 2023 01:50:02 +0000 (UTC)
Message-Id: <20230131015001.704E31A923A@mollari.NetBSD.org>
Date: Tue, 31 Jan 2023 01:50:01 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pkg_alternatives fails very late on broken ALTERNATIVES
X-Send-Pr-Version: www-1.0

>Number:         57206
>Category:       pkg
>Synopsis:       pkg_alternatives fails very late on broken ALTERNATIVES
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 31 01:55:00 +0000 2023
>Last-Modified:  Tue Jan 31 02:25:01 +0000 2023
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD Alternative
>Environment:
being frozen^Wfried in carbonite
>Description:
lang/guile18 has bin/guild in ALTERNATIVES, but not in PLIST.  Attempting to register it with `pkg_alternatives rebuild' fails:

pkg_alternatives: the alternative `/pkg/2022Q4/guile/1.8/bin/guild' is not an executable

This causes pkg_alternatives to stop in the middle, so I wound up with bin/go but not bin/python3.

Fixing lang/guile18 is easy, but this infrastructure is fragile.

1. The package should fail to build if ALTERNATIVES doesn't match the package's PLIST so we detect this mistake early.  (It has been lurking in lang/guile18 since March 2022.)

2. Perhaps `pkg_alternatives rebuild' should try to reregister _all_ the packages' alternatives, and then, once done trying to register all packages, fail if any of them failed.
>How-To-Repeat:
1. Install guile18.
2. Install python310.
3. Install pkg_alternatives.
4. Try to run python3 -- fail.
>Fix:
Yes please!

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57206 CVS commit: pkgsrc/lang/guile18
Date: Tue, 31 Jan 2023 02:20:03 +0000

 Module Name:	pkgsrc
 Committed By:	riastradh
 Date:		Tue Jan 31 02:20:03 UTC 2023

 Modified Files:
 	pkgsrc/lang/guile18: ALTERNATIVES

 Log Message:
 lang/guile18: No alternative for bin/guild.

 guile 1.8 doesn't install any guile/1.8/bin/guild, so we can't offer
 that as an alternative for bin/guild.

 PR pkg/57206

 XXX pullup-2022Q4


 To generate a diff of this commit:
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/guile18/ALTERNATIVES

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

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.