Bugzilla – Bug 117634
time_zoneproposal.ycp does not check the /bin/date return code
Last modified: 2008-07-16 15:46:44 UTC
SCR::Execute in clients/timezone_proposal.ycp::"MakeProposal" returned -1 because fork of /bin/date +%Y failed. As a result, the date was always < 2004 and installation could not start. it should probably be if (tointeger(m["exit"]:"1") == 0 && tointeger (m["stdout"]:"0") < 2004)
Could you attach whole log file? I'm not sure if it could be better - what do you think MakeProposal should return if date call fails?
it should just accept the current time. inst_setup does set it to a sensible date since 10.0.
please attach the whole log file
I dont have them anymore. can you briefly describe the error handling here? normal case: /var/log/YaST2/y2log-2:2005-09-14 12:44:38 <1> linux(2854) [YCP] clients/timezone_proposal.ycp:28 date call: $["exit":0, "stderr":"", "stdout":"2005\n"] error case: /var/log/YaST2/y2log-2:2005-09-14 12:44:38 <1> linux(2854) [YCP] clients/timezone_proposal.ycp:28 date call: $["exit":-1, "stderr":"", "stdout":""] will the "0" be used as date value? If so, why is it 0 and not 2004?
No, why should it? It uses stdout value. Why should it be 2004?
what if stdout is empty because /bin/date did not run?
Than there is "0" as default value
and does "0" make sense in this context, because it prevents installation?
Yes, because something goes wrong when the date doesn't run.
More info: the check for "date in the past" was done because of bug #57458.
Olaf, I really think this is invalid. I don't see any better solution when date doesn't return reasonable result and thus part of the system is in some unknown state. (Sorry if my previous comments were too strict.)