-
-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XWIKI-22503: xwiki-<database>-common install fail when cancelling dbconfig #3497
Conversation
When upgrading the xwiki-mysql-common package, an error in the postinst script can be observed in specific cases: Unpacking xwiki-mysql-common (16.7.1) over (16.7.1) ... Setting up xwiki-mysql-common (16.7.1) ... dbconfig-common: writing config to /etc/dbconfig-common/xwiki.conf dbconfig-common: flushing administrative password /var/lib/dpkg/info/xwiki-mysql-common.postinst: line 23: return: can only `return' from a function or sourced script dpkg: error processing package xwiki-mysql-common (--configure): installed xwiki-mysql-common package post-installation script subprocess returned error exit status 2 Errors were encountered while processing: xwiki-mysql-common E: Sub-process /usr/bin/dpkg returned an error code (1) This commit fixes return to be exit.
Was it a reinstall or a cancelled dbconfig in your case ? We generally create an issue on https://jira.xwiki.org/browse/XWIKI to associate it with the commit to have a better traceability from the release note to the commit. |
This happened on every package upgrade since I installed the package a few months ago (had to edit postinst every time). Because I wanted to capture the error, in this case it was |
Well, this part of the script is very old, and it's the first time someone report a problem like this. Maybe you refused dbconfig back then and it's disabled for good, for upgrades too.
I can create it, but I wanted more detail about what exactly is the use case to put on it. |
As far as I remember, I declined to use dbconfig (db is created and managed by Puppet, package is also installed by Puppet), I guess everyone else uses it so I could try to install on a test box with some more detail... |
That's what I'm expecting the difference to be, yes. So I will create an issue related to a cancelled dbconfig. |
When upgrading the xwiki-mysql-common package, an error in the postinst script can be observed in specific cases:
Unpacking xwiki-mysql-common (16.7.1) over (16.7.1) ... Setting up xwiki-mysql-common (16.7.1) ...
dbconfig-common: writing config to /etc/dbconfig-common/xwiki.conf dbconfig-common: flushing administrative password
/var/lib/dpkg/info/xwiki-mysql-common.postinst: line 23: return: can only `return' from a function or sourced script dpkg: error processing package xwiki-mysql-common (--configure):
installed xwiki-mysql-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
xwiki-mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
This commit fixes return to be exit.
Jira URL
Changes
Description
Clarifications
Screenshots & Video
Executed Tests
Expected merging strategy
*