View Issue Details

IDProjectCategoryView StatusLast Update
0019738phpList 3 applicationAutomatic updaterpublic13-02-19 12:35
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/ /var/www/ /var/www/ /var/www/

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

File to delete: config/
File to delete: misc/How to install Piwik.html
File to delete: misc/internal-docs/
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/
File to delete: misc/phpstorm-codestyles/Piwik_codestyle.xml
File to delete: misc/phpstorm-codestyles/
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/" "/var/www/" "/var/www/ to install Piwik.html" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/" "/var/www/"
TagsNo tags attached.



30-01-19 11:47

developer   ~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.


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?


31-01-19 07:44

developer   ~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).