View Issue Details

IDProjectCategoryView StatusLast Update
0019738phpList 3 applicationAutomatic updaterpublic13-02-19 12:35
Reportersamtuke 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version3.3.8 
Target Versionnext minorFixed in Version 
Summary0019738: Generate command to delete all unexpected files
DescriptionTo make it easier for users to remove files which are blocking an update, generate the command which is necessary to remove them all at once. For example Piwik provides this in the following way:

File integrity

File integrity check failed and reported some errors. You should fix this issue and then refresh this page until it shows no error.
Directories were found in your Matomo but we didn't expect them.
--> Please delete these directories to prevent errors. <--

Directory to delete: libs/angularjs
Directory to delete: vendor/mnapoli
Directory to delete: vendor/myclabs
Directory to delete: vendor/tedivm


To delete all these directories at once, you can run this command:
rm -Rf /var/www/thinkingfree.org/public_html/piwik/libs/angularjs /var/www/thinkingfree.org/public_html/piwik/vendor/mnapoli /var/www/thinkingfree.org/public_html/piwik/vendor/myclabs /var/www/thinkingfree.org/public_html/piwik/vendor/tedivm

Files were found in your Matomo but we didn't expect them.
--> Please delete these files to prevent errors. <--

File to delete: PULL_REQUEST_TEMPLATE
File to delete: config/global.ini.auto-backup-before-update.php
File to delete: misc/How to install Piwik.html
File to delete: misc/internal-docs/content-tracking.md
File to delete: misc/others/api_internal_call.php
File to delete: misc/others/cli-script-bootstrap.php
File to delete: misc/others/iframeWidget.htm
File to delete: misc/others/phpstorm-codestyles/Piwik_codestyle.xml
File to delete: misc/others/phpstorm-codestyles/README.md
File to delete: misc/phpstorm-codestyles/Piwik_codestyle.xml
File to delete: misc/phpstorm-codestyles/README.md
File to delete: misc/proxy-hide-piwik-url/piwik.php
File to delete: libs/bower_components/jquery-ui/ui/.jshintrc
File to delete: vendor/twig/twig/.editorconfig


To delete all these files at once, you can run this command:
rm "/var/www/thinkingfree.org/public_html/piwik/PULL_REQUEST_TEMPLATE" "/var/www/thinkingfree.org/public_html/piwik/config/global.ini.auto-backup-before-update.php" "/var/www/thinkingfree.org/public_html/piwik/misc/How to install Piwik.html" "/var/www/thinkingfree.org/public_html/piwik/misc/internal-docs/content-tracking.md" "/var/www/thinkingfree.org/public_html/piwik/misc/others/api_internal_call.php" "/var/www/thinkingfree.org/public_html/piwik/misc/others/cli-script-bootstrap.php" "/var/www/thinkingfree.org/public_html/piwik/misc/others/iframeWidget.htm" "/var/www/thinkingfree.org/public_html/piwik/misc/others/phpstorm-codestyles/Piwik_codestyle.xml" "/var/www/thinkingfree.org/public_html/piwik/misc/others/phpstorm-codestyles/README.md" "/var/www/thinkingfree.org/public_html/piwik/misc/phpstorm-codestyles/Piwik_codestyle.xml" "/var/www/thinkingfree.org/public_html/piwik/misc/phpstorm-codestyles/README.md" "/var/www/thinkingfree.org/public_html/piwik/misc/proxy-hide-piwik-url/piwik.php" "/var/www/thinkingfree.org/public_html/piwik/libs/bower_components/jquery-ui/ui/.jshintrc" "/var/www/thinkingfree.org/public_html/piwik/vendor/twig/twig/.editorconfig"
TagsNo tags attached.

Activities

duncanc

30-01-19 11:47

updater   ~0061801

@samtuke Are you sure that this is the right way to go, instead of changing the updater to just ignore "unexpected" files and directories? I don't understand what the problem is with doing that.

The Piwik approach seems to be much more detailed, in that it is identifying unrecognised files below the top-level directory. The phplist updater objects only to files/directores at the top level.

samtuke

30-01-19 14:23

administrator   ~0061805

@duncanc Good point. Presumably it's hard to ignore files because they would have to be moved out of, then back into, the directories, as a fresh copy of phpList dirs are extracted and used.

@xheni @suela Thoughts?

duncanc

31-01-19 07:44

updater   ~0061807

The "model" that I see the updating process following is to replace the phplist files and directories in the containing directory, not to replace the entire containing directory.
So it would replace
the files index.php, lt.php, ut.php etc
the directories admin, config. images etc
and additionally restore the config.php file. It could also restore any additional plugins that have been installed.

This way the process doesn't need to know whether there are any other files or directories in that containing directory.

If someone has made changes to the phplist code, say a file in lists/admin or a front-end translation file then it is their responsibility to save and restore or re-apply those changes (although there is probably a way that the updater could make that easier).