Bug 117634 - time_zoneproposal.ycp does not check the /bin/date return code
Summary: time_zoneproposal.ycp does not check the /bin/date return code
Status: RESOLVED INVALID
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Installation (show other bugs)
Version: RC 4
Hardware: PowerPC Linux
: P5 - None : Normal
Target Milestone: ---
Assignee: Jiří Suchomel
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-17 16:25 UTC by Olaf Hering
Modified: 2008-07-16 15:46 UTC (History)
0 users

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Hering 2005-09-17 16:25:14 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)
Comment 1 Jiří Suchomel 2005-09-19 07:33:52 UTC
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?
Comment 2 Olaf Hering 2005-09-19 07:59:26 UTC
it should just accept the current time. inst_setup does set it to a sensible
date since 10.0.
Comment 3 Jiří Suchomel 2005-09-19 12:20:24 UTC
please attach the whole log file
Comment 4 Olaf Hering 2005-09-21 12:56:50 UTC
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?
Comment 5 Jiří Suchomel 2005-09-21 13:04:22 UTC
No, why should it? It uses stdout value. Why should it be 2004?
Comment 6 Olaf Hering 2005-09-21 13:05:41 UTC
what if stdout is empty because /bin/date did not run?
Comment 7 Jiří Suchomel 2005-09-21 13:17:58 UTC
Than there is "0" as default value
Comment 8 Olaf Hering 2005-09-21 13:20:59 UTC
and does "0" make sense in this context, because it prevents installation?
Comment 9 Jiří Suchomel 2005-09-21 13:27:07 UTC
Yes, because something goes wrong when the date doesn't run.
Comment 10 Jiří Suchomel 2005-09-21 13:32:43 UTC
More info: the check for "date in the past" was done because of bug #57458.
Comment 11 Jiří Suchomel 2005-09-22 14:54:50 UTC
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.)