[pca] Understanding --fromfiles

Don O'Malley Don.Omalley at Sun.COM
Fri Nov 13 11:45:40 CET 2009


Hi Martin,

Assuming everything is working as intended I believe your approach below 
is correct.

SunSolve & getupdates2 do adhere to the standard HTTP return codes.
This is a complete list of the return codes I have seen from 
SunSolve/getupdates2 to date:
401 Unauthorized
403 Forbidden
404 Not Found
500 Server Error
503 Service Unavailable
504 Gateway Timeout

So, while the messaging around the different return codes may change, 
the actual return code itself (and it's meaning) will not.
If possible I would code to extract the return code and interpret from 
there.

Best,
-Don

Martin Paul wrote:
> Mauricio Tavares wrote:
>> Now if I could make it tell me whether I am not allowed to download a
>> patch (as opposite of it not being available) instead of just saying
>>
>> Trying https://sunsolve.sun.com/ (1/1)
>> Failed
>> Failed (patch not found)
>
> I made up my mind, as some more details on failed patch downloads 
> definitely would be nice. It will also make support easier, as I won't 
> have to ask for debug output anymore in certain cases.
>
> So the current development version of pca analyzes output from wget, 
> looks for errors, and displays them on failed donwloads of any file. 
> Example:
>
>   Looking for 142675-01 (1/1)
>   Trying https://sunsolve.sun.com/ (1/1)
>   Failed (Error 403: Forbidden)
>   ...
>
> I've also added a table of known errors to pca's documentation under 
> "DOWNLOAD ERRORS":
>
>   $ pca --man
>   ...
>   DOWNLOAD ERRORS
>      If downloads of patches, patch READMEs or the patchdiag.xref
>      file fail, the displayed error might help to diagnose the
>      problem:
>
>      Unauthorized (401)
>          The user/passwd you provided is not correct.
>
>      Forbidden (403)
>          The user/passwd is correct, but the SOA is not connected
>          to a support contract, which is needed for the requested
>          file.
>
>      Not Found (404)
>          The requested file does not exist on SunSolve.
>
>      Server Error (500)
>          The SunSolve server is in a bad state. Retry later.
>
> I just hope that both wget's output format and SunSolve's HTTP replies 
> won't change to often, forcing me to adapt my code. I tried to keep it 
> as generic as possible.
>
> Martin.
>



More information about the pca mailing list