I have just merged a PR (*) which changes naming conventions for TFTP (kernel/init ram disk) files and creates an API so plugins can easily hook and provide their own conventions. Katello, for example, will take advantage of that and will name the files after product name and kickstart id.
The default Foreman core example is Installation-Media-Name-base64_hash-vmlinuz. The hash is a SHA of installation media URL after variables are interpolated. Example:
This will allow kickstart flavours to co-exist (Worstation vs Server) and also changing Installation media for hosts/hostgroups will not lead to re-downloading and over-writing same files over and over again.
Heads up: this change actually does not prevent to workaround situation when content changes upstream.
Situation: New CentOS is released an the centos-7 repository is updated together with kernel and initramdisk. New provisioning will still fail. There is not an easy solution to this, Foreman would need to determine timestamp of the files from the HTTP server.
The same applies to Katello override, however this case is probably easier to fix. Katello tracks last sync date and time, so the naming convention can be changed to include last sync date-time as suffix. On the other hand, this would create too many files for users who sync very often which is most of them.
So I guess the only solution is either Foreman or Proxy to do HEAD HTTP request and getting Last-Modified or ETag HTTP headers. If a server provides it, this can be added to the filename for katello or to the UUID itself for core.
I lean towards putting this to Foreman because this way we can actually test in advance if repository URL is present and server responds. If the HEAD request fails, we can inform the user quickly before even trying out to enter build mode.