Seravo/wordpress

Composer install/update fails on leftover Akismet files (after Akismet new release in May 2017)

Closed this issue · 4 comments

ottok commented

Many users have reported the running composer install or composer update failed with an error message like:

  - Installing koodimonni-plugin-language/woocommerce-sv_se (3.0.7): Downloading (100%)         
  - Installing koodimonni-plugin-language/bbpress-sv_se (2.5.12): Downloading (100%)         
  - Installing koodimonni-plugin-language/akismet-sv_se (3.3.2): Downloading (100%)         
  - Installing koodimonni-language/sv_se (4.7.5): Downloading (100%)         
  - Installing seravo/seravo-plugin (1.5.1): Downloading (100%)         
  - Installing wpackagist-plugin/auto-post-thumbnail (3.4.1): Downloading (100%)         
  - Installing wpackagist-plugin/google-analytics-dashboard-for-wp (5.0): Downloading (100%)         
  - Installing wpackagist-plugin/wp-native-dashboard (1.3.12): Downloading (100%)         
  - Installing wpackagist-theme/twentysixteen (1.3): Downloading (100%)         
  - Installing wpackagist-theme/twentyfifteen (1.7): Downloading (100%)         
Writing lock file
Generating autoload files
> WordPress\Installer::symlinkWPContent
Script WordPress\Installer::symlinkWPContent handling the post-update-cmd event terminated with an exception

                                                                                           
  [ErrorException]                                                                         
  rmdir(/data/wordpress/htdocs/wordpress/wp-content/plugins/akismet): Directory not empty  
                                                                                           

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

Indeed, a directory for akismet exists:

$ ll /data/wordpress/htdocs/wordpress/wp-content/plugins/akismet
total 20
drwxrwxrw- 1 vagrant vagrant 4096 touko 22 19:17 ./
drwxrwxrw- 1 vagrant vagrant 4096 touko 22 19:15 ../
-rwxrwxr-x 1 vagrant vagrant  629 touko 22 19:15 .htaccess*

The workaround is to simply delete it manually: rm -rf /data/wordpress/htdocs/wordpress/wp-content/plugins/akismet

ottok commented

Do not close this bug report, but keep it open as information for all users who might bump into this bug with their existing projects.

The problem is introduced by a new Akismet version that includes a .htaccess file. This is in upstream and we cannot "fix" the root cause.

The downstream remedy is in this repo now. To backport the fix to your existing fork/project, run:

cd master/scripts/WordPress
rm Installer.php
curl -O https://raw.githubusercontent.com/Seravo/wordpress/master/scripts/WordPress/Installer.php

Couldn't you just remove Akismet or does WordPress force it?

ottok commented

WordPress default install (via composer) forces Akismet, Hello Dolly and the latest TwentySomething theme.

ottok commented

People are unlikely to bump into this anymore, so no need to keep this open for informational purposes. The issue itself is fixed and most likely all project templates that had this have been updated by their respective developers.