[QA] app dependencies are not checked during `occ upgrade`
Seen with files_classifier-1.5.0-rc.1
- install ownCloud 10.13.4 with files_classifier-1.4.0
- occ app:enable files_classifier
- visit admin page 'Workflow & Tasks
-> the 'Document Classificationsection is there. - occ app:list files_classifier
Enabled:
- files_classifier:
- Version: 1.4.0
- Path: /var/www/owncloud/apps/files_classifier
- occ market:install -l /tmp/files_classifier-1.5.0-rc.1.tar.gz
files_classifier: Installing new version from /tmp/files_classifier-1.5.0-rc.1.tar.gz
files_classifier: App updated.
- occ upgrade
...
Updating <files_classifier> ...
Updated <files_classifier> to 1.5.0
...
- occ app:list files_classifier
Enabled:
- files_classifier:
- Version: 1.5.0
- Path: /var/www/owncloud/apps-external/files_classifier
- The app is upgraded, and seems up and running fin.
- nothing tells the admin, that he should have installed exiftool. BAD.
- when a user uploads a picture. an error happens. OK
- But the upload just happens, without applying any policies like triggering a workflows, or possibly getting blocked. BAD
app dependency validation was implemented years ago and was also unchanged all these years.
Hard to believe this is not working now.
app:enable does:
sudo -u www-data php occ app:enable files_classifier
In app.php line 1128:
App "Document Classification" cannot be installed because the following dependencies are not fulfilled: The command line tool exiftool could not be found
app:enable [-g|--groups GROUPS] [--] <app-id>
same as WebUI:
Reproducing the above steps again on a fresh system.
I can confirm, the webUI admin/apps says
But the webUI market page seems to be happy:
and so is occ app:list files_classifier:
Enabled:
- files_classifier:
- Version: 1.5.0
- Path: /var/www/owncloud/apps-external/files_classifier
But yes, if the admin ignores that it is already enabled, and stubbornly tries occ app:enable files_classifier then he sees the proper "dependencies are not fulfilled" message. But why should an admin try to enable the app that is already enabled?
I believe my scenario is not at all that unlikely. Expected behavior: occ market:install -l should have failed with the "dependencies are not fulfilled" error message.
Adding dependencies during update did not happen often in the past. Maybe it is even the first time?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed.