NetBSD Problem Report #47466

From  Fri Jan 18 08:22:15 2013
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 1B17B63E933
	for <>; Fri, 18 Jan 2013 08:22:15 +0000 (UTC)
Message-Id: <>
Date: Fri, 18 Jan 2013 08:22:12 +0000 (UTC)
Subject: pkg_add lacks OLDNAME support
X-Send-Pr-Version: 3.95

>Number:         47466
>Category:       pkg
>Synopsis:       pkg_add lacks OLDNAME support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 18 08:25:00 +0000 2013
>Last-Modified:  Sun Jan 20 07:54:21 +0000 2013
>Originator:     Alan Barrett
>Release:        NetBSD 6.99.16
Not much
System: NetBSD 6.99.16 i386
	It used to be the case that "make replace" could be passed
	an "OLDNAME" variable, giving the name of a different package to
	be replaced.  That no longer works.

	The OLDNAME variable is still honoured by the
	_pkgformat-deinstall target in pkgsrc/mk/pkgformat/pkg/,
	but that target is no longer invoked during "make replace"
	for packages that have PKG_DESTDIR_SUPPORT != none.

	I suspect that OLDNAME support needs to be added to pkg_add(1),
	and the makefiles need to be adjusted to pass the OLDNAME
	when invoking pkg_add with the -U or -u options.

	Also, OLDNAME is not documented in pkgsrc.txt.
	# Install xlockmore
	cd pkgsrc/x11/xlockmore
	make package-install

	# Try to replace it with xlockmore-lite
	cd pkgsrc/x11/xlockmore-lite
	make replace OLDNAME=xlockmore

	# It fails with this message:
===> replace-destdir [xlockmore-lite-5.41nb2] ===> Updating using binary package of xlockmore-lite-5.41nb2
/usr/sbin/pkg_add -K /var/db/pkg -U -D /wherever/pkgsrc/packages/NetBSD-6.99.16-i386-pkgtype=overwrite/All/xlockmore-lite-5.41nb2.tgz
pkg_add: Package `xlockmore-lite-5.41nb2' conflicts with `xlockmore-[0-9]*', and `xlockmore-5.41' is installed.
pkg_add: Installed package `xlockmore-5.41' conflicts with `xlockmore-lite-[0-9]*' when trying to install `xlockmore-lite-5.41nb2'.

	# This workaround succeeds:
	cd pkgsrc/x11/xlockmore-lite
	make replace OLDNAME=xlockmore PKG_DESTDIR_SUPPORT=none

	Add OLDNAME support to pkg_add(1).

	Adjust pkgsrc makefiles accordingly.

	Document it all.



Responsible-Changed-From-To: gnats-admin->pkg-manager
Responsible-Changed-When: Sat, 19 Jan 2013 21:57:09 +0000
pick up after gnats


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.