-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Package Manager] Re-Download missing packages #14018
base: 3.x
Are you sure you want to change the base?
Commits on Jul 11, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 3fc5038 - Browse repository at this point
Copy the full SHA 3fc5038View commit details
Commits on Jul 12, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 606dc0f - Browse repository at this point
Copy the full SHA 606dc0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ab3571 - Browse repository at this point
Copy the full SHA 4ab3571View commit details
Commits on Jul 13, 2018
-
Configuration menu - View commit details
-
Copy full SHA for eef48c8 - Browse repository at this point
Copy the full SHA eef48c8View commit details
Commits on Jul 28, 2018
-
[Package Manager] Re-Download missing packages
Was surprised that the package manager is not able to re-download packages in case the zip files / extracted folders are missing for an installed package (for whatever reason, in my particular case did I want to save space for backups and did not include the packages folder...). When trying to re-install a package with missing files it would proceed to the installation (of course without metadata displaying), then when hitting "Continue" show the modal and say could not download the package etc., but it never actually tried to re-download... This PR changes that so if the zip file is not present, it would actually try to re-download it. There is an edge case where the package is not available anymore on the provider (for example I had an old version of the "console" extra that was not available anymore) and the provider would return an error code (e.g. 404 in that case), but the old code would actually "package" the response HTML or JSON code into a .zip file and then of course the installation would fail with "could not unpack package"...This PR also solves that issue by handling error codes from the provider. Although not used very often, I did rewrite large parts of the _getByFsockopen() method as it needed some love.
Configuration menu - View commit details
-
Copy full SHA for f291a83 - Browse repository at this point
Copy the full SHA f291a83View commit details
Commits on Jul 29, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 51f4052 - Browse repository at this point
Copy the full SHA 51f4052View commit details -
Split up oneliner into variables...
Hopefully slightly more readable, also added comments.
Configuration menu - View commit details
-
Copy full SHA for bd29d3f - Browse repository at this point
Copy the full SHA bd29d3fView commit details -
Harmonize comment style + empty dir fix
Switch comment style to the one used in the rest of the file. Also make sure that if there is a package directory it is checked that it has files in it, I occasionally have the scenario when that directory is there, but its empty, then the package re-unpack fails and so does the installation of the package.
Configuration menu - View commit details
-
Copy full SHA for 43a626c - Browse repository at this point
Copy the full SHA 43a626cView commit details -
Separate code into getMetadata() method
Following the advice from @OptimusCrime, I added a more generic getMetadata() method to the class, like this any other metadata can also be accessed more easily in case its ever needed.
Configuration menu - View commit details
-
Copy full SHA for 6a2f944 - Browse repository at this point
Copy the full SHA 6a2f944View commit details -
When updating a package it would also trigger the re-download logic (as package file not present yet) and re-assign the `$sourceFile` variable passed to `transportPackage()` which would cause it to fail. Therefore it is now checked if the `$sourceFile` variable contains a URL already, if that's the case, the re-download logic is skipped. When triggering a re-install action from the manager the `$sourceFile` variable is set to the package string and not a URL like when an update is triggered.
Configuration menu - View commit details
-
Copy full SHA for 69c081b - Browse repository at this point
Copy the full SHA 69c081bView commit details
Commits on Jul 30, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 290cee5 - Browse repository at this point
Copy the full SHA 290cee5View commit details
Commits on Aug 3, 2018
-
Change getMetadata() to return directly
also changed referrer URL scheme
Configuration menu - View commit details
-
Copy full SHA for 4195e57 - Browse repository at this point
Copy the full SHA 4195e57View commit details
Commits on Feb 17, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d0fd631 - Browse repository at this point
Copy the full SHA d0fd631View commit details
Commits on Feb 20, 2019
-
Merge pull request #1 from Ibochkarev/patch-2
Otherwise a xx4 or xx5 would be detected too.
Configuration menu - View commit details
-
Copy full SHA for f459f06 - Browse repository at this point
Copy the full SHA f459f06View commit details
Commits on May 22, 2019
-
[Package Manager] Re-Download missing packages
Was surprised that the package manager is not able to re-download packages in case the zip files / extracted folders are missing for an installed package (for whatever reason, in my particular case did I want to save space for backups and did not include the packages folder...). When trying to re-install a package with missing files it would proceed to the installation (of course without metadata displaying), then when hitting "Continue" show the modal and say could not download the package etc., but it never actually tried to re-download... This PR changes that so if the zip file is not present, it would actually try to re-download it. There is an edge case where the package is not available anymore on the provider (for example I had an old version of the "console" extra that was not available anymore) and the provider would return an error code (e.g. 404 in that case), but the old code would actually "package" the response HTML or JSON code into a .zip file and then of course the installation would fail with "could not unpack package"...This PR also solves that issue by handling error codes from the provider. Although not used very often, I did rewrite large parts of the _getByFsockopen() method as it needed some love.
Configuration menu - View commit details
-
Copy full SHA for ade661c - Browse repository at this point
Copy the full SHA ade661cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 160b7d6 - Browse repository at this point
Copy the full SHA 160b7d6View commit details -
Split up oneliner into variables...
Hopefully slightly more readable, also added comments.
Configuration menu - View commit details
-
Copy full SHA for 5bbb2b1 - Browse repository at this point
Copy the full SHA 5bbb2b1View commit details -
Harmonize comment style + empty dir fix
Switch comment style to the one used in the rest of the file. Also make sure that if there is a package directory it is checked that it has files in it, I occasionally have the scenario when that directory is there, but its empty, then the package re-unpack fails and so does the installation of the package.
Configuration menu - View commit details
-
Copy full SHA for 8257b2d - Browse repository at this point
Copy the full SHA 8257b2dView commit details -
Separate code into getMetadata() method
Following the advice from @OptimusCrime, I added a more generic getMetadata() method to the class, like this any other metadata can also be accessed more easily in case its ever needed.
Configuration menu - View commit details
-
Copy full SHA for 35eeb5f - Browse repository at this point
Copy the full SHA 35eeb5fView commit details -
When updating a package it would also trigger the re-download logic (as package file not present yet) and re-assign the `$sourceFile` variable passed to `transportPackage()` which would cause it to fail. Therefore it is now checked if the `$sourceFile` variable contains a URL already, if that's the case, the re-download logic is skipped. When triggering a re-install action from the manager the `$sourceFile` variable is set to the package string and not a URL like when an update is triggered.
Configuration menu - View commit details
-
Copy full SHA for a2647cc - Browse repository at this point
Copy the full SHA a2647ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 317c829 - Browse repository at this point
Copy the full SHA 317c829View commit details -
Change getMetadata() to return directly
also changed referrer URL scheme
Configuration menu - View commit details
-
Copy full SHA for 1a00781 - Browse repository at this point
Copy the full SHA 1a00781View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb8318b - Browse repository at this point
Copy the full SHA bb8318bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6353263 - Browse repository at this point
Copy the full SHA 6353263View commit details -
Configuration menu - View commit details
-
Copy full SHA for 017304e - Browse repository at this point
Copy the full SHA 017304eView commit details -
it's my editor trying to be smart...
sorry about that, doing it directly in the github editor... I did a 1:1 copy from the original repo^^
Configuration menu - View commit details
-
Copy full SHA for f4b6b9d - Browse repository at this point
Copy the full SHA f4b6b9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7dfa009 - Browse repository at this point
Copy the full SHA 7dfa009View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4662482 - Browse repository at this point
Copy the full SHA 4662482View commit details -
Configuration menu - View commit details
-
Copy full SHA for 509acd3 - Browse repository at this point
Copy the full SHA 509acd3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2136019 - Browse repository at this point
Copy the full SHA 2136019View commit details
Commits on Sep 19, 2020
-
Update core/model/modx/transport/modtransportpackage.class.php
Co-authored-by: Joshua Lückers <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4fb2db2 - Browse repository at this point
Copy the full SHA 4fb2db2View commit details