[lokisetup] Problem with scripts not adding to installed_bytes
Derek R. Gaston
drgasto at sandia.gov
Tue Jun 29 11:02:23 EDT 2004
Seriously: sz comes across as "10M" in my case - it just reads the
"size" property of the "script" tag.
At any rate - I went ahead and made a couple of patches that fix this
issue and get the progress bars updating correctly.
I put it in bugzilla here:
https://bugzilla.icculus.org/show_bug.cgi?id=1830
Derek
Rob Crittenden wrote:
>On Tue, 29 Jun 2004, Derek R. Gaston wrote:
>
>
>>At around 866 of copy.c there is:
>>
>> rc = copy_script(info, node,
>> xmlNodeListGetString(info->config, node->childs, 1),
>> path, update, from_cdrom, msg);
>> if (rc == 0 && sz) {
>> info->installed_bytes += atoi(sz);
>> size += atoi(sz);
>> }
>>
>>
>>Now - that looks good and all - but in practice rc is NEVER 0 - so a
>>script never adds to the installed bytes. Is there a reason for this or
>>is it a bug? Not only that but I'm not sure that "atoi(sz)" is going to
>>do what we want (there is an M in sz so it needs to be converted like it
>>is elsewhere).
>>
>>
>
>run_script returns the exit value of the script it ran so your script
>should return 0 upon exit. A non-zero error returning from a script
>generally indicates an error.
>
>There should NOT be an M in sz. size is the number of >bytes< that were
>copied. This could be a documentation defect, I don't know. I suppose it
>would be reasonable to add support for "M".
>
>rob
>
>
>
More information about the Lokisetup
mailing list