file delete -force not deleting everything

Blair Zajac blair at orcaware.com
Sat Feb 10 17:33:42 PST 2007


On 10.3.9, but not 10.4, the db44 port doesn't build with this error:

Installing documentation: 
/bztmp/MacPorts/var/db/dports/build/_bztmp_MacPorts_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_databases_db44/work/destroot/bztmp/MacPorts/share/db44-4.4.20/ 
...
DEBUG: Executing proc-post-com.apple.destroot-destroot-0
Error: Target com.apple.destroot returned: error deleting 
"/bztmp/MacPorts/var/db/dports/build/_bztmp_MacPorts_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_databases_db44/work/destroot/bztmp/MacPorts/share/db44-4.4.20/api_c": 
file already exists
Warning: the following items did not execute (for db44): 
com.apple.activate com.apple.destroot com.apple.install
Error: Status 1 encountered during processing.


Doing a ktrace shows this:

  19629 tclsh8.4 CALL  lstat(0x69bc08,0xbfff9b30)
  19629 tclsh8.4 NAMI 
"/bztmp/MacPorts/var/db/dports/build/_bztmp_MacPorts_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_databases_db44/work/destroot/bztmp/MacPorts/share/db44-4.4.20/api_c/memp_openfd.html"
  19629 tclsh8.4 RET   lstat 0
  19629 tclsh8.4 CALL  unlink(0x69bc08)
  19629 tclsh8.4 NAMI 
"/bztmp/MacPorts/var/db/dports/build/_bztmp_MacPorts_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_databases_db44/work/destroot/bztmp/MacPorts/share/db44-4.4.20/api_c/memp_openfd.html"
  19629 tclsh8.4 RET   unlink 0
  19629 tclsh8.4 CALL  getdirentries(0xc,0x1807e00,0x1000,0x313884)
  19629 tclsh8.4 RET   getdirentries 0
  19629 tclsh8.4 CALL  lseek(0xc,0,0,0)
  19629 tclsh8.4 RET   lseek 0
  19629 tclsh8.4 CALL  close(0xc)
  19629 tclsh8.4 RET   close 0
  19629 tclsh8.4 CALL  rmdir(0x69bc08)
  19629 tclsh8.4 NAMI 
"/bztmp/MacPorts/var/db/dports/build/_bztmp_MacPorts_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_databases_db44/work/destroot/bztmp/MacPorts/share/db44-4.4.20/api_c"
  19629 tclsh8.4 RET   rmdir -1 errno 66 Directory not empty


And doing an ls in there shows all the files after memp_openfd.html.

This is generated by this line in the Portfile

post-destroot {
         file delete -force ${destroot}${prefix}/share



Has anybody seen anything like this before?

Is the "file delete" an operation provided by Tcl?

It's odd that it would go through and try to delete everything, but not 
finish the job.

I'm tempted to change the "file delete -force" into a system "rm -fr 
..." call.

Regards,
Blair



More information about the macports-dev mailing list