[MDEV-31423] /etc/init.d/mariadb: line 90: [: : integer expression expected Created: 2023-06-07  Updated: 2023-06-09  Resolved: 2023-06-09

Status: Closed
Project: MariaDB Server
Component/s: Platform Debian, Upgrades
Affects Version/s: 10.6
Fix Version/s: 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2

Type: Bug Priority: Major
Reporter: Łukasz Assignee: Tuukka Pasanen
Resolution: Fixed Votes: 0
Labels: None
Environment:

WSL2 with Debian GNU/Linux 11 (bullseye) (11.7)


Issue Links:
Relates
relates to MDEV-31331 preinst broken due to unset variable Closed

 Description   
  • After using sudo apt update && sudo apt upgrade the system returned the following:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mariadb-client-10.6 : Breaks: mariadb-server-10.6 (< 1:10.6.13+maria~deb11) but 1:10.6.12+maria~deb11 is installed
                       Breaks: mariadb-server-core-10.6 (< 1:10.6.13+maria~deb11) but 1:10.6.12+maria~deb11 is installed
 mariadb-client-core-10.6 : Breaks: mariadb-server-core-10.6 (< 1:10.6.13+maria~deb11) but 1:10.6.12+maria~deb11 is installed
 mariadb-server : Depends: mariadb-server-10.6 (>= 1:10.6.13+maria~deb11) but 1:10.6.12+maria~deb11 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

  • As suggested, I used sudo apt --fix-broken install. Then i used sudo apt update && sudo apt upgrade.
  • The above issue has been solved, but another problem has appeared - when starting the mariadb service, an error appears:

df: '': No such file or directory
/etc/init.d/mariadb: line 90: [: : integer expression expected

  • Is there any way I can fix this, or should I wait for the next apt mariadb update?


 Comments   
Comment by Daniel Black [ 2023-06-07 ]

apologies - hopefully fixed with https://github.com/MariaDB/server/commit/30fb72ca6e27742f20003c208985eb711e12c70a

Comment by Daniel Black [ 2023-06-07 ]

Ah, not in init.d script - illuusio same fix?

Comment by Tuukka Pasanen [ 2023-06-07 ]

This should happen but happens so fixing it now.

Comment by Tuukka Pasanen [ 2023-06-07 ]

Ok I find the problem. As init.d script uses

/usr/sbin/mariadbd --print-defaults

to get configs
and greps there correct datadir but in default installation but datadir in only printed if it's configured in config file.

Comment by Tuukka Pasanen [ 2023-06-07 ]

Now there is Github pull request #2664 to be tested. Can you test if patch works kanlukasz-dev as expected and comment?

Comment by Łukasz [ 2023-06-08 ]

@Tuukka Pasanen, i updated the

 /etc/init.d/mariadb 

file with these new lines from

 #2664 PR 

and can confirm that it now works properly.

Generated at Thu Feb 08 10:23:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.