PhoenicisOrg / scripts

Phoenicis scripts
GNU Lesser General Public License v3.0
64 stars 49 forks source link

Avoid that runtime is installed multiple times during one installation #1123

Closed plata closed 4 years ago

plata commented 4 years ago

It is sufficient to download/update the runtime once during one installation. We can safely assume that the runtime does not change during this period of time.

fixes #1055

madoar commented 4 years ago

I'm not a fan of this solution. It looks like a hack to me. I think a better approach is to check whether the runtime folder exists. If it does we should perform some validation (checksum? file counting?). If the folder is valid we skip the runtime installation, if not we replace/download it.

ImperatorS79 commented 4 years ago

You always have to fetch the json from internet to check if the runtime has been updated. This PR just avoids that if the runtime json have already been fetched in one installation it is not fetched again during this installation.

madoar commented 4 years ago

I understand that but still in theory we require only one mechanism that can be used in all situations.

ImperatorS79 commented 4 years ago

I do not understand what you mean here.

madoar commented 4 years ago

We can use the approach I described above in all situations, independent of whether we are calling the same method multiple times during one installation or across multiple installations. We don't need a second "fallback" solution.

ImperatorS79 commented 4 years ago

I still do not understand why what has been done is a hack. We do not have the checksum of each file inside the runtime, and it would be insane to check everything.