NetBSD Problem Report #55615

From www@netbsd.org  Sat Aug 29 14:52:48 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 82C3F1A923F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Aug 2020 14:52:48 +0000 (UTC)
Message-Id: <20200829145246.EE5D11A9242@mollari.NetBSD.org>
Date: Sat, 29 Aug 2020 14:52:46 +0000 (UTC)
From: bruce.lilly+nbsd@gmail.com
Reply-To: bruce.lilly+nbsd@gmail.com
To: gnats-bugs@NetBSD.org
Subject: pkgin -F (force package reinstall) doesn't (force package reinstall)
X-Send-Pr-Version: www-1.0

>Number:         55615
>Category:       pkg
>Synopsis:       pkgin -F (force package reinstall) doesn't (force package reinstall)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 29 14:55:00 +0000 2020
>Originator:     Bruce Lilly
>Release:        9.0
>Organization:
>Environment:
NetBSD cq60-615dx.blilly.net 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 Intel 686-class NetBSD
>Description:
Occasionally a package may need to be reinstalled to correct a problem (e.g. corrupted file).  pkgin -F, according to the man page, should force a package reinstall, but it merely reports "nothing to be done".
>How-To-Repeat:
Install some package
corrupt some file (e.g. a man page or configuration file)
try to force a reinstall via pkgin -F

To recover (or as a workaround)
manually force reinstall via
   pkg_delete -f
   pkg_add -DU
>Fix:
Partial fix:
*** impact.c.orig       Mon May 25 04:22:50 2020
--- impact.c    Fri Aug 28 20:55:27 2020
***************
*** 268,273 ****
--- 268,275 ----
                                }

                                TRACE("   * upgrade with %s\n", lpkg->full);
+                               /* 2020-08-19 BL: 0>pdp->keep means reinstall */
+                               if (0>pdp->keep) toupgrade=TOINSTALL;
                                /*
                                 * insert as an upgrade
                                 * oldpkg is used when building removal order

"Partial" fix because it still sometimes fails to force a reinstall; I suspect that a full fix would involve adding an additional macro to distinguish a forced reinstall from "TOINSTALL".

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.