Настраивается пакет koha-common (24.11.03-2) … Upgrading database schema for koha3 dpkg: ошибка при обработке пакета koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 1 При обработке следующих пакетов произошли ошибки: koha-common E: Sub-process /usr/bin/dpkg returned an error code (1)
There isn't really a bug description here. Rather, it sounds like you could use some support. I suggest one of the options available at https://koha-community.org/support/
The error occurred during the update. apt upgrade ... Setting up koha-common (24.11.03-2) ... Upgrading database schema for koha3 dpkg: error processing package koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: koha-common E: Sub-process /usr/bin/dpkg returned an error code (1)
This isn't a valid bug report. Please consult the support link posted previously.
Someone else seems to be having the same problem: https://chat.koha-community.org/koha-community/pl/h1gk86f5t7dw3m4w35huwdcd7o
Since there are 2 people reporting errors here I thought I'd take a deeper look. Decided to take a KTD from a custom 23.11.x to the Koha community released 24.11.03-2. Upgrading database schema for kohadev /usr/sbin/koha-upgrade-schema: 44: /kohadevbox/koha/installer/data/mysql/needs_update.pl: not found dpkg: error processing package koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 127 Errors were encountered while processing: koha-common E: Sub-process /usr/bin/dpkg returned an error code (1) -- But... that's because my Koha git repo is still on 23.11.x, so let me try that again using the tag v24.11.03-2 Upgrading database schema for kohadev Use of uninitialized value $pref in string eq at /kohadevbox/koha/installer/data/mysql/db_revs/231200005.pl line 89. 0E0 Upgrade to 23.12.00.000 [00:06:57]: Increase DBRev for 23.12 <Lots of valid upgrade lines...> Upgrade to 24.11.03.000 [00:07:07]: Koha 24.11.03 release Enabling plugins on node rabbit@kohadevbox: rabbitmq_stomp The following plugins have been configured: rabbitmq_stomp Applying plugin configuration to rabbit@kohadevbox... Plugin configuration unchanged. * Restarting RabbitMQ Messaging Server rabbitmq-server [ OK ] Restarting memcached: memcached. -- It's looking OK to me.
I think I might be reproducing the problem now... After a fine install for koha-common, I upgraded koha-l10n to 24.11.03-2. Then I re-installed koha-common 24.11.03-2 and now I'm getting the error: Preparing to unpack .../koha-common_24.11.03-2_all.deb ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of stop. Unpacking koha-common (24.11.03-2) over (24.11.03-2) ... Setting up koha-common (24.11.03-2) ... invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Upgrading database schema for kohadev dpkg: error processing package koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: koha-common E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kohadevbox:koha$ koha-upgrade-schema kohadev Upgrading database schema for kohadev root@kohadevbox:koha$ echo $? 1 As I said on Mattermost, I had a feeling that "koha-upgrade-schema INSTANCE" was probably silently failing, and that appears to be the case.
Apologies for the delay on this one, Igor. This kind of issue does require additional information. Luckily, someone on Mattermost provided some extra information, which gave me an idea, and I was able to reproduce the problem on my system. I can confirm it's from bug 34088, since tweaking "installer/data/mysql/needs_update.pl" to not return an exit code of 1 fixed the problem. Now I can run "dpkg --configure koha-common" and it completes successfully. A workaround would be to do this: 1. vi /usr/share/koha/intranet/cgi-bin/installer/data/mysql/needs_update.pl 2. Perform the following change: -exit !Koha::Installer->needs_update; +Koha::Installer->needs_update; +exit; 3. dpkg --configure koha-common 4. apt-get install koha-common 5. Confirm that everything is fine now That should get your system back into a healthy state, while we work on resolving the deeper problem...
Created attachment 180084 [details] [review] Bug 39460: Fix koha-upgrade-schema when no DB change needed This patch fixes koha-upgrade-schema so that it returns an exit code of 0 whether or not a DB change is needed. This is important so that koha-common.postinst proceeds correctly even when there is no DB change needed (e.g. for 24.11.03-2) Test plan: 0. Apply the patch 1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema 2. dpkg-reconfigure koha-common 3. Note the process completes correctly 4. koha-upgrade-schema kohadev 5. Note following text appears very quickly: Upgrading database schema for kohadev No database change required 6. koha-mysql kohadev update systempreferences set value = '24.1102000' where variable = 'Version'; 7. Clear memcached 8. koha-upgrade-schema kohadev 9. Note that it applies the 24.11.03 database upgrade
Created attachment 180085 [details] [review] Bug 39460: Fix koha-upgrade-schema when no DB change needed This patch fixes koha-upgrade-schema so that it returns an exit code of 0 whether or not a DB change is needed. This is important so that koha-common.postinst proceeds correctly even when there is no DB change needed (e.g. for 24.11.03-2) Test plan: 0. Apply the patch 1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema 2. dpkg-reconfigure koha-common 3. Note the process completes correctly 4. koha-upgrade-schema kohadev 5. Note following text appears very quickly: Upgrading database schema for kohadev No database change required 6. koha-mysql kohadev update systempreferences set value = '24.1102000' where variable = 'Version'; 7. Clear memcached 8. koha-upgrade-schema kohadev 9. Note that it applies the 24.11.03 database upgrade Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 180223 [details] [review] Bug 39460: Fix koha-upgrade-schema when no DB change needed This patch fixes koha-upgrade-schema so that it returns an exit code of 0 whether or not a DB change is needed. This is important so that koha-common.postinst proceeds correctly even when there is no DB change needed (e.g. for 24.11.03-2) Test plan: 0. Apply the patch 1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema 2. dpkg-reconfigure koha-common 3. Note the process completes correctly 4. koha-upgrade-schema kohadev 5. Note following text appears very quickly: Upgrading database schema for kohadev No database change required 6. koha-mysql kohadev update systempreferences set value = '24.1102000' where variable = 'Version'; 7. Clear memcached 8. koha-upgrade-schema kohadev 9. Note that it applies the 24.11.03 database upgrade Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Nice work David! Pushed to 24.11.x for 24.11.03 (24.11.03-3)