Prefetch Command

(imported topic written by MBARTOSH)

Does the prefetch command check for the existence of the file before it attemps to download it? If so, how does it verify the existence of a file?

(imported comment written by cglimson)

Hi,

This might help:
http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.tem.doc_9.0%2FPlatform%2FAction%2Fc_prefetch.html

Regards.

(imported comment written by jgstew)

http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.tem.doc_9.0%2FPlatform%2FAction%2Fc_prefetch.html

The documentation is out of date and incorrect and does not directly address MBARTOSH’s question.

The prefetch command should look for a matching SHA1 already downloaded, or look for a matching file name then try to verify the SHA1 & size.

In the documentation, an example is given in which an IF statement is used to differentiate between 2 different prefetch commands. This does not appear to work the way described and should result in both files being downloaded due to prefetch being executed before the IF statement is considered. This is consistent with the note that says relevance substitution is not performed. To actually achieve this, a prefetch block is needed instead.

Also, lately IBM provided fixlets have included a SHA256: value which is not in the documentation.

(imported comment written by MattPeterson)

The IF statements ARE evaluated before the prefech commands are issued. Clients will only download the files that are needed based on the IF statements prior to the action being run (I see this behavior all the time), however the relay server(s) will need to download ALL packages (including the ones the client doesn’t need) before allowing the client(s) to run. The IF statements are actually evaluated again during the action.

If you use the prefetch block you will need to have all of your prefetch commands at the beginning of the action (prior to any other commands). Personally I find this somewhat limiting, so I stick with the old prefech commands.

(imported comment written by jgstew)

Interesting. I’ll have to give this a closer look. This does not match my recollection from last time I looked at this, but I may have mistaken one for another.