NetBSD Problem Report #43398

From www@NetBSD.org  Tue Jun  1 09:22:04 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7E86663B8E3
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  1 Jun 2010 09:22:04 +0000 (UTC)
Message-Id: <20100601092204.0DB3F63B8CF@www.NetBSD.org>
Date: Tue,  1 Jun 2010 09:22:04 +0000 (UTC)
From: obata@lins.jp
Reply-To: obata@lins.jp
To: gnats-bugs@NetBSD.org
Subject: Failed create wrapper due to missing hard link support on Haiku OS
X-Send-Pr-Version: www-1.0

>Number:         43398
>Category:       pkg
>Synopsis:       Failed create wrapper due to missing hard link support on Haiku OS
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 01 09:25:00 +0000 2010
>Closed-Date:    Mon Dec 29 09:18:32 +0000 2014
>Last-Modified:  Tue Dec 30 09:00:00 +0000 2014
>Originator:     OBATA Akio
>Release:        
>Organization:
>Environment:
Haiku OS
>Description:
On Haiku OS, failed to create wrapper script due to missing hard link support: http://dev.haiku-os.org/ticket/1879

In pkgsrc/mk/wrapper/bsd.wrapper.mk line 503:
  ${LN} -f $$wrapper ${.TARGET}

It' the only one using hard link in pkgsrc framework.
>How-To-Repeat:
Use pkgsrc on Haiku (or other OS or filesystem not support hard link).

>Fix:
Even if I changed "${LN} -f" to "${LN} -sf", it works for me.
I'm not sure that hard link is really required on certain environment.

>Release-Note:

>Audit-Trail:
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43398 CVS commit: pkgsrc/mk
Date: Mon, 16 Aug 2010 10:03:45 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Mon Aug 16 10:03:44 UTC 2010

 Modified Files:
 	pkgsrc/mk/platform: Haiku.mk
 	pkgsrc/mk/wrapper: bsd.wrapper.mk

 Log Message:
 Force to use symbolic link for wrapper if WRAPPER_USE_SYMLINK is defined.
 Workaround for missing hard link support on Haiku, PR#43398.


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/mk/platform/Haiku.mk
 cvs rdiff -u -r1.84 -r1.85 pkgsrc/mk/wrapper/bsd.wrapper.mk

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

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 29 Dec 2014 09:18:32 +0000
State-Changed-Why:
fixed by submitter in 2010


From: "OBATA Akio" <obata@lins.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43398 (Failed create wrapper due to missing hard link support
 on Haiku OS)
Date: Tue, 30 Dec 2014 14:45:27 +0900

 On Mon, 29 Dec 2014 18:18:32 +0900, <dholland@netbsd.org> wrote:

 > Synopsis: Failed create wrapper due to missing hard link support on Haiku OS
 >
 > State-Changed-From-To: open->closed
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Mon, 29 Dec 2014 09:18:32 +0000
 > State-Changed-Why:
 > fixed by submitter in 2010

 It is a workaround, not a fix.

 I want to know "Who require hard link".
 For example, pkgsrc has "COMPILER_USE_SYMLINKS" and "yes" by default.
 So I have no idea why "hard link is the default" here.

 It is the main issue of this PR.
 -- 
 OBATA Akio / obata@lins.jp

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43398 (Failed create wrapper due to missing hard link
 support on Haiku OS)
Date: Tue, 30 Dec 2014 07:31:38 +0000

 On Tue, Dec 30, 2014 at 05:50:00AM +0000, OBATA Akio wrote:
  >  > State-Changed-From-To: open->closed
  >  > State-Changed-By: dholland@NetBSD.org
  >  > State-Changed-When: Mon, 29 Dec 2014 09:18:32 +0000
  >  > State-Changed-Why:
  >  > fixed by submitter in 2010
  >  
  >  It is a workaround, not a fix.

 I dunno, it seems like a fix to me - the platform doesn't support hard
 links, so add a flag to not use them.

  >  I want to know "Who require hard link".
  >  For example, pkgsrc has "COMPILER_USE_SYMLINKS" and "yes" by default.
  >  So I have no idea why "hard link is the default" here.

 If COMPILER_USE_SYMLINKS is turned off, what you get isn't a hard link
 but a sh script that execs the main wrapper. Don't ask me why that's
 a useful mode, but it doesn't seem particularly related.

 Anyway, as far as why... I dunno, but my guess would be: hard links
 are slightly faster to load, remember, and when running the wrappers
 any little bit helps.

 Also, for anything that's a make target, using symlinks always raises
 some issues about whether make inspects the timestamp on the link or
 the timestamp on the file. Not inviting such trouble is a reason to
 use hard links.

 But ultimately there's no reason *not* to use hard links when they
 work. Instead of having a knob to set it might be tidier to do

    ${LN} -f $$wrapper ${.TARGET} || \
    ${LN} -sf $$wrapper ${.TARGET} || \
    ${CP} $$wrapper ${.TARGET}

 so it works transparently and also on platforms that don't have either
 hard links or symlinks. But it probably doesn't matter much.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "OBATA Akio" <obata@lins.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43398 (Failed create wrapper due to missing hard link support
 on Haiku OS)
Date: Tue, 30 Dec 2014 17:56:56 +0900

 On Tue, 30 Dec 2014 16:35:00 +0900, David Holland <dholland-pbugs@netbsd.org> wrote:

 >   >  It is a workaround, not a fix.
 > I dunno, it seems like a fix to me - the platform doesn't support hard
 >  links, so add a flag to not use them.

 It depend on filesystem, same as case-{in}sensitive, and currently pkgsrc has
 no way to detect filesystem capabilities.

 -- 
 OBATA Akio / obata@lins.jp

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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