[53272] trunk/base/src/port1.0/portdestroot.tcl

jmr at macports.org jmr at macports.org
Wed Jul 1 23:11:28 PDT 2009


Revision: 53272
          http://trac.macports.org/changeset/53272
Author:   jmr at macports.org
Date:     2009-07-01 23:11:28 -0700 (Wed, 01 Jul 2009)
Log Message:
-----------
Fix re-pointing of symlinks to gzipped man pages in destroot to work with absolute paths, instead of the previous solution of converting to relative paths (r47111). Fixes #18302.

Modified Paths:
--------------
    trunk/base/src/port1.0/portdestroot.tcl

Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl	2009-07-02 06:01:22 UTC (rev 53271)
+++ trunk/base/src/port1.0/portdestroot.tcl	2009-07-02 06:11:28 UTC (rev 53272)
@@ -229,11 +229,6 @@
                 set manlinkpath [file join $manpath $manlink]
                 # if link destination is not gzipped, check it
                 set manlinksrc [file readlink $manlinkpath]
-                # if link destination is an absolute path, convert it to a
-                # relative path
-                if {[file pathtype $manlinksrc] eq "absolute"} {
-                    set manlinksrc [file tail $manlinksrc]
-                }
                 if {![regexp "\[.\]gz\$" ${manlinksrc}]} {
                     set mandir [file dirname $manlink]
                     set mandirpath [file join $manpath $mandir]
@@ -242,8 +237,13 @@
                         puts $err
                         return
                     }
+                    # if link source is an absolute path, check for it under destroot
+                    set mls_check "$manlinksrc"
+                    if {[file pathtype $mls_check] eq "absolute"} {
+                        set mls_check "${destroot}${mls_check}"
+                    }
                     # if gzipped destination exists, fix link
-                    if {[file isfile ${manlinksrc}.gz]} {
+                    if {[file isfile ${mls_check}.gz]} {
                         # if actual link name does not end with gz, rename it
                         if {![regexp "\[.\]gz\$" ${manlink}]} {
                             ui_debug "renaming link: $manlink to ${manlink}.gz"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090701/5ddb804f/attachment.html>


More information about the macports-changes mailing list