NetBSD Problem Report #21263

Received: (qmail 23040 invoked by uid 605); 22 Apr 2003 18:40:28 -0000
Message-Id: <3048-1051036827@rainier.reedmedia.net>
Date: Tue, 22 Apr 2003 11:40:28 -0700
From: reed@reedmedia.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: reed@reedmedia.net
To: gnats-bugs@gnats.netbsd.org
Subject: symlinks for GNU_PROGRAM_PREFIX not checked, linking fails because file exists
X-Send-Pr-Version: 3.95

>Number:         21263
>Category:       pkg
>Synopsis:       symlinks for GNU_PROGRAM_PREFIX not checked, linking fails because file exists
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 22 18:41:00 +0000 2003
>Closed-Date:    Tue Apr 22 20:25:56 +0000 2003
>Last-Modified:  Thu Jun 12 19:51:49 +0000 2003
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:


System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Some packages that use  GNU_PROGRAM_PREFIX also install a symlink
if needed.
But they don't check if already exists!

if !defined(GNU_PROGRAM_PREFIX) || ${GNU_PROGRAM_PREFIX} != "g"
        ${LN} -s ${GNU_PROGRAM_PREFIX}m4 ${PREFIX}/bin/gm4

>How-To-Repeat:
Install gm4 or gmake with empty GNU_PROGRAM_PREFIX and file
or link already exists.
>Fix:
gtar-base
patch
gm4
gmake

Maybe ln should also use -f to force; or remove first.
>Release-Note:
>Audit-Trail:

From: Thomas Klausner <wiz@netbsd.org>
To: reed@reedmedia.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/21263: symlinks for GNU_PROGRAM_PREFIX not checked, linking fails because file exists
Date: Tue, 22 Apr 2003 21:43:10 +0200

 On Tue, Apr 22, 2003 at 11:40:28AM -0700, reed@reedmedia.net wrote:
 > Some packages that use  GNU_PROGRAM_PREFIX also install a symlink
 > if needed.
 > But they don't check if already exists!

 Are there pkgsrc reasons that the link might already exist?
  Thomas

From: "Jeremy C. Reed" <reed@reedmedia.net>
To: Thomas Klausner <wiz@netbsd.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/21263: symlinks for GNU_PROGRAM_PREFIX not checked, linking
 fails because file exists
Date: Tue, 22 Apr 2003 13:06:04 -0700 (PDT)

 On Tue, 22 Apr 2003, Thomas Klausner wrote:

 > On Tue, Apr 22, 2003 at 11:40:28AM -0700, reed@reedmedia.net wrote:
 > > Some packages that use  GNU_PROGRAM_PREFIX also install a symlink
 > > if needed.
 > > But they don't check if already exists!
 >
 > Are there pkgsrc reasons that the link might already exist?

 If someone does a pkgsrc install using FORCE_PKG_REGISTER.

 Or sometimes, a user may happen to reinstall a package via pkgsrc on top
 of pre-existing. In the last time, this happened to me, I accidently
 deleted /var/db/pkg on this particular system, so I was just reinstalling
 all again via pkgsrc.

 Note that bzip2, php4-zlib, unzip, zip, festvox-en1, gnome-audio and
 others do ln -f when creating (sym)links.

 Thanks for looking at this.

    Jeremy C. Reed
    http://bsd.reedmedia.net/


State-Changed-From-To: open->closed 
State-Changed-By: wiz 
State-Changed-When: Tue Apr 22 20:25:20 UTC 2003 
State-Changed-Why:  
Fixed the four cases you mentioned; reply to this PR or open a new one if 
you find more. 
Thanks for the PR! 

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/21263 CVS commit: pkgsrc
Date: Tue, 22 Apr 2003 20:25:10 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Tue Apr 22 20:25:10 UTC 2003

 Modified Files:
 	pkgsrc/archivers/gtar-base: Makefile
 	pkgsrc/devel/gmake: Makefile
 	pkgsrc/devel/m4: Makefile
 	pkgsrc/devel/patch: Makefile

 Log Message:
 Use ${LN} -sf to create symlinks.
 Closes PR 21263 by Jeremy C. Reed.


 To generate a diff of this commit:
 cvs rdiff -r1.28 -r1.29 pkgsrc/archivers/gtar-base/Makefile
 cvs rdiff -r1.43 -r1.44 pkgsrc/devel/gmake/Makefile
 cvs rdiff -r1.18 -r1.19 pkgsrc/devel/m4/Makefile
 cvs rdiff -r1.14 -r1.15 pkgsrc/devel/patch/Makefile

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.