file delete -force not deleting everything
Juan Manuel Palacios
jmpp at macports.org
Tue Feb 13 09:38:32 PST 2007
On Feb 11, 2007, at 6:21 PM, Ryan Schmidt wrote:
>
> 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?)
I presume whoever wrote 'delete' was smart enough to abstract it to
adapt to whatever is best on each platform we support ;-) basically
Panther and Tiger at the moment. Silent author willing to provide any
clues...?
In any case, calling out to 'system' is generally frowned upon, so
that should be avoided, yes.
> Then I would say that yes, we should globally search and replace in
> all portfiles.
Yes, totally... volunteering...? ;-)
> 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.
If svn supports multiple {pre,post}-commit scripts then I'd like to
keep each one to specific tasks, one for svn ps and others for their
own specific stuff, not one giant "I can handle it all" script. I wrote
some days ago asking if any one would volunteer to start putting
something together but no one wrote back :-(
However, checking for "things we shouldn't be using in Portfiles"
seems like a bit of a longshot to me, we handle a good number of
special case ports that do things we can't reject, however much we may
dislike them. Instead, Portfile writing "good practices" should be
documented and advocated where ever we can, I'm at the moment trying to
document 'delete' in portfile(7).
Regards,...
-jmpp
More information about the macports-dev
mailing list