Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2003 23:01:12 -0600 (MDT)
From:      "John E. Hein" <jhein@timing.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Octave maintainer <ports@FreeBSD.org>
Subject:   ports/56621: bad link in octave when install package using pkg_add -p
Message-ID:  <200309090501.h8951BVQ000324@Elmer.timing.com>
Resent-Message-ID: <200309090510.h895ABad062064@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         56621
>Category:       ports
>Synopsis:       bad link in octave when install package using pkg_add -p
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 08 22:10:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     John E. Hein
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Timing Solutions
>Environment:
System: FreeBSD Elmer.timing.com 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Wed Jan 2 03:24:03 MST 2002 root@Bugs.timing.com:/usr/src/sys/compile/LOCAL_MP i386



>Description:

	If you build a package for math/octave, then try to install
	the package to a non-default location using pkg_add -p (as
	you might if you were building a system under a different
	mount point, like a chroot), the lib/octave sym link will
	point to the wrong place.


>How-To-Repeat:
	

    cd math/octave
    make package
    pkg_add -r /some/chroot octave-2.1.50.tgz
    ls -l /some/chroot/usr/local/lib/octave


    Observe that it points to /some/chroot/usr/local/lib/octave-2.1.50
    which fails when in the chroot.


>Fix:

	Don't sym link to an absolute path name; then it works in all cases.

	Here's the patch...

--- math/octave/pkg-plist.orig	Tue Aug 26 11:11:24 2003
+++ math/octave/pkg-plist	Mon Sep  8 22:47:44 2003
@@ -306,7 +306,7 @@
 lib/octave-%%OCTAVE_VERSION%%/liboctinterp.so
 lib/octave-%%OCTAVE_VERSION%%/liboctinterp.so.%%OCTAVE_VERSION%%
 @unexec /bin/rm -f %D/lib/octave
-@exec /bin/ln -sf %D/lib/octave-%%OCTAVE_VERSION%% %D/lib/octave
+@exec /bin/ln -sf octave-%%OCTAVE_VERSION%% %D/lib/octave
 libexec/octave/%%OCTAVE_VERSION%%/exec/%%GNU_HOST%%/info-emacs-info
 libexec/octave/%%OCTAVE_VERSION%%/exec/%%GNU_HOST%%/info-emacs-octave-help
 libexec/octave/%%OCTAVE_VERSION%%/oct/%%GNU_HOST%%/airy.oct
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309090501.h8951BVQ000324>