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
file delete is a built-in Tcl command - do a `man n file` to see it. And yeah, it definitely should work. On Feb 10, 2007, at 8:33 PM, 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.
-- Kevin Ballard http://kevin.sb.org eridius@macports.org http://www.tildesoft.com
On Feb 10, 2007, at 7:48 PM, Kevin Ballard wrote:
file delete is a built-in Tcl command - do a `man n file` to see it.
And yeah, it definitely should work.
Should, but there have been issues before; see <http://www.opendarwin.org/pipermail/darwinports/2006-April/033616.html> for the first time I think it came up with MP...the bug (now in trac): <http://trac.macports.org/projects/macports/ticket/7063> According to the changeset for it <http://trac.macports.org/projects/macports/changeset/19038> MP has a 'delete' command which should do the trick instead of 'system "rm -rf"' ('delete' is definied in portutil.tcl for those curious). Bryan
On Feb 10, 2007, at 8:33 PM, 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.
-- Kevin Ballard http://kevin.sb.org eridius@macports.org http://www.tildesoft.com
--On February 10, 2007 9:48:58 PM -0500 Kevin Ballard <eridius@macports.org> wrote:
file delete is a built-in Tcl command - do a `man n file` to see it.
And yeah, it definitely should work.
On Feb 10, 2007, at 8:33 PM, 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 -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>. -- Mike Alexander mta@umich.edu Ann Arbor, MI PGP key ID: BEA343A6
Mike Alexander wrote:
--On February 10, 2007 9:48:58 PM -0500 Kevin Ballard <eridius@macports.org> wrote:
file delete is a built-in Tcl command - do a `man n file` to see it.
And yeah, it definitely should work.
On Feb 10, 2007, at 8:33 PM, 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 -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. Regards, Blair
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.
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
I don't think this sort of thing is appropriate for a pre-commit hook. That said, if you want multiple specialized hooks, just write one generic hook script which calls all the others in turn. On Feb 13, 2007, at 12:38 PM, Juan Manuel Palacios wrote:
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).
-- Kevin Ballard http://kevin.sb.org eridius@macports.org http://www.tildesoft.com
participants (6)
-
Blair Zajac
-
Bryan Blackburn
-
Juan Manuel Palacios
-
Kevin Ballard
-
Mike Alexander
-
Ryan Schmidt