file delete -force not deleting everything

Ryan Schmidt ryandesign at macports.org
Sun Feb 11 14:21:24 PST 2007


On Feb 11, 2007, at 14:46, Blair Zajac wrote:

>>>> 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.
>>>
>>> file delete is a built-in Tcl command - do a `man n file` to see it.
>>>
>>> And yeah, it definitely should work.
>>
>> "file delete -force" is broken in some versions of TCL on MacOSX.   
>> See <http://aspn.activestate.com/ASPN/Mail/Message/Tcl-bugs/ 
>> 2838168> and <http://docs.info.apple.com/article.html?artnum=107884>.
>
> Thanks for all the info.
>
> I've updated the db44 Portfile and it builds fine on 10.3.
>
> Maybe we should do a global search and replace for all the Portfile's.

So we're saying that "file delete" which is provided by TCL is broken  
and should never be used? And "delete" which is provided by MacPorts  
should always be used instead? (And that calling system "rm -rf" is  
also a faux pas?) Then I would say that yes, we should globally  
search and replace in all portfiles. Also, when we finally get around  
to writing that pre-commit hook script for the repository, it should  
check for the use of file delete or system "rm -rf" and prevent such  
commits and recommend the "delete" alternative.





More information about the macports-dev mailing list