On upgrading the Debian package from 3.10 to 3.11, sudo apt full-upgrade fails with the following:

Generated config in write(): encrypted virtual host configuration    [success]
(/var/aegir/config/server_master/nginx/vhost.d/staging.aegir.example.com)
PHP Fatal error:  Cannot redeclare probes_site_audit_drush_command() (previously declared in /var/aegir/hostmaster-7.x-3.10/sites/staging.ae
gir.example.com/modules/contrib/hosting_site_audit/drush/probes_site_audit.drush.inc:7) in /var/aegir/hostmaster-7.x-3.11/sites/staging
.aegir.example.com/modules/contrib/hosting_site_audit/drush/probes_site_audit.drush.inc on line 29
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Cannot redeclare probes_site_audit_drush_command() (previously
declared in
/var/aegir/hostmaster-7.x-3.10/sites/staging.aegir.example.com/modules/contrib/hosting_site_audit/drush/probes_site_audit.drush.inc:7)
in
/var/aegir/hostmaster-7.x-3.11/sites/staging.aegir.example.com/modules/contrib/hosting_site_audit/drush/probes_site_audit.drush.inc,
line 29
The external command could not be executed due to an application     [error]
error.
Generated config in write(): encrypted virtual host configuration    [success]

Looks like it's picking up the Drush command from both versions?

Comments

colan created an issue. See original summary.

colan’s picture

Workaround: Disable this module before the upgade, and then re-enable it afterwards.

  1. drush @hm dis hosting_site_audit
  2. sudo apt full-upgrade
  3. drush @hm en hosting_site_audit

Hopefully we can come up with a more permanent solution soon.

helmo’s picture

We normally git these files included via ~/.drush/drushrc.php ... During the upgrade that file will be re-written, but it should never point to both.

Why is this happening here and not for other modules that bundle drush code.

One thing I can think of is the name.
The file is called probes_site_audit.drush.inc while the module is called hosting_site_audit. Drush tries to use that name for files and functions.

colan’s picture

Title: Aegir upgrade from 3.10 to 3.11 fails with redeclaration of probes_site_audit_drush_command() » Debian package upgrades fail with "redeclaration of probes_site_audit_drush_command()"
Version: 7.x-3.0-alpha1 » 7.x-3.x-dev

More generic title / version.

colan’s picture