[MacPorts] #25075: postflight script sometimes overwrites conf files
MacPorts
noreply at macports.org
Tue Jun 1 06:26:31 PDT 2010
#25075: postflight script sometimes overwrites conf files
------------------------------+---------------------------------------------
Reporter: brad@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Keywords: | Port:
------------------------------+---------------------------------------------
Comment(by brad@…):
I have been testing the pkg postflight and
upgrade_sources_conf_default.tcl scripts and haven't been able to
overwrite sources.conf again.
In upgrade_sources_conf_default.tcl:
if {[catch {file rename ${sourcesConf} "${sourcesConf}.mpsaved"}]} {
file rename -force ${sourcesConf} "${sourcesConf}.mpsaved_[clock
seconds]"
}
file rename ${tempfile} ${sourcesConf}
eval file attributes ${sourcesConf} $attributes
What conditions could cause the first two rename attempts to fail?
If the first two rename attempts fail does tcl continue to the third
rename?
Unrelated, I noticed that InstallationCheck has this path hardcoded
"/opt/local/etc/ports/dp_version".
--
Ticket URL: <http://trac.macports.org/ticket/25075#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list