[MacPorts] #18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute
#18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- MacPorts base has this nifty feature whereby it automatically gzips manpages after the destroot phase. It then looks for any symlinks in the destroot that point to the now-compressed manpages, and deletes and re- creates them pointing to the gzipped versions (since the manpage filenames have changed through the addition of ".gz"). This works great... ...until a port installs a symlink pointing to an absolute path instead of a relative one. Boom, the symlink doesn't get recreated anymore and we have problems with * coreutils (#15864) * findutils (#18227) * pure, pure-devel (#18294) and probably more. The real kicker is that MacPorts base sometimes correctly re-links an absolute symlink: when a previous version of the port is already installed! since then the target of the symlink (with the addition of ".gz") exists. MacPorts should see if the manpage symlink path is absolute, and if so, prepend the destroot path, or something like that. -- Ticket URL: <http://trac.macports.org/ticket/18302> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by perry@…): From my brief testing, prefixing the destroot path to the absolute path is not what you want; you end up with symlinks referencing paths in destroot. Instead, I tried converting the absolute symlinks to relative symlinks, which as far as I can tell (at least from the listed examples and the following lines in portdestroot.tcl) is simply the file name: {{{ 231 set mandir [file dirname $manlink] 232 set mandirpath [file join $manpath $mandir] 233 set pwd [pwd] 234 if {[catch {_cd $mandirpath} err]} { 235 puts $err 236 return 237 } }}} I've gone ahead and committed this possible fix in r47111 (it fixes #18227 at least). -- Ticket URL: <http://trac.macports.org/ticket/18302#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Replying to [comment:1 perry@…]:
From my brief testing, prefixing the destroot path to the absolute path is not what you want; you end up with symlinks referencing paths in destroot.
What I meant was, when checking to see if the target of the symlink exists, prepend the destroot if the target is an absolute path. When creating the new replacement symlink to the compressed manpage, of course you would not prepend the destroot. -- Ticket URL: <http://trac.macports.org/ticket/18302#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.7.0 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by perry@…): Ah, my bad; at the time, I wasn't thinking straight and just prefixed manlinksrc with destroot (when it was an absolute path) and forgot to remove it when recreating the symlink. -- Ticket URL: <http://trac.macports.org/ticket/18302#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18302: MacPorts doesn't recreate manpage symlink after compressing manpage if symlink is absolute --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.7.0 Resolution: fixed | Keywords: Port: | --------------------------------------+------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: I implemented what Ryan suggested in r53272, so we're not messing with the path type. -- Ticket URL: <http://trac.macports.org/ticket/18302#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts