On 2017-6-22 17:56 , Mojca Miklavec wrote:
Hi,With respect to: https://travis-ci.org/macports/macports-ports/jobs/245649003 I would imagine that "delete -force" would not error out if the file is missing. This code was added by Joshua: https://github.com/macports/macports-base/commit/485900103 So perhaps he has more insight. If it's causing an error, that line could be moved inside some "if that file exists". error deleting "/opt/local/var/macports/home/Library/Preferences/com.apple.dt.Xcode.plist": no such file or directory while executing "file delete -force "${target_dir}/com.apple.dt.Xcode.plist"" (procedure "macports::copy_xcode_plist" line 5) invoked from within "macports::copy_xcode_plist $env(HOME)" (procedure "mportinit" line 540) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, error deleting "/opt/local/var/macports/home/Library/Preferences/com.apple.dt.Xcode.plist": no such file or directory
'file delete' documentation explicitly says that "Trying to delete a non-existent file is not considered an error." That's regardless of the -force option. And that has always seemed to be how it actually works. This should be affecting just about everyone otherwise.
So all in all that's a very strange error to be getting. The fact that it shows up only on Travis of course suggests that there is something unusual about the environment there. Can't imagine what it would be though; this appears to be a built-in Tcl command misbehaving after all.
- Josh
