[MacPorts] #35226: muniversal portgroup fails when port installs "broken" symlinks

MacPorts noreply at macports.org
Tue Jul 17 03:52:29 PDT 2012


#35226: muniversal portgroup fails when port installs "broken" symlinks
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:                                       
Component:  ports                    |     Version:  2.1.1                                
 Keywords:                           |        Port:  muniversal                           
-------------------------------------+--------------------------------------
 I'm unable to [ticket:35225 update fontconfig to 2.10] because of this bug
 in the muniversal portgroup. The problem is:

  * muniversal uses [file exists] to determine if a file exists in both
 destroots or only in one, to determine whether it should try to merge them
 or just copy one
  * fontconfig 2.10 wants to install some absolute symlinks—at destroot
 time, they're "broken" because what they're pointing to doesn't exist yet,
 but it will once the port is activated
  * for symlinks, [file exists] answers about the thing the symlink points
 to, not about the symlink itself

 The result is that for each of these "broken" symlinks, muniversal prints
 an incorrect line like:

 {{{
 DEBUG: universal: merge: /opt/local/etc/fonts/conf.d/20-unhint-small-
 vera.conf only exists in
 /opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_fontconfig/fontconfig/work
 /destroot-x86_64
 }}}

 And then the merging of the destroots ultimately fails with:

 {{{
 Error: org.macports.destroot for port fontconfig returned: error copying
 "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_fontconfig/fontconfig/work/destroot-i386//opt/local/etc/fonts/conf.d/20
 -unhint-small-vera.conf" to
 "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_fontconfig/fontconfig/work
 /destroot-intel//opt/local/etc/fonts/conf.d/20-unhint-small-vera.conf":
 file already exists
 }}}

 I do not know why [file exists] acts on the symlink target instead of on
 the symlink itself. I don't see any switch to make [file exists] act on
 the symlink itself. There is no [file islink] that we could use. There is
 [file type]; we could perhaps use [file type] instead of [file exists],
 and take an error condition to mean that the file does not exist. There
 are multiple places within the muniversal portgroup where this would need
 to be addressed.

 We might even consider adding a Tcl procedure to MacPorts base which could
 abstract away this solution (just as we already have Tcl procedures for
 "ln", "delete", "copy" and "move" in base to deal with other common
 needs). One slight problem is that portutil.tcl already contains an
 "exists" procedure and it has nothing to do with the filesystem.

-- 
Ticket URL: <https://trac.macports.org/ticket/35226>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list