I tracked down the issue to the plymouth-theme-kubuntu-text.postinst script:
Comparing /var/lib/dpkg/info/plymouth-theme-ubuntu-text.postinst and /var/lib/dpkg/info/plymouth-theme-kubuntu-text.postinst we see that the first has:
----------------------------------------
case "$1" in
configure|triggered)
if [ "$1" = "configure" ]; then
# We remove leftover generated file from previous plymouth version. Can be removed on xenial+1
if dpkg --compare-versions "$2" le-nl "0.9.2-3ubuntu1~"; then rm -f /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
fi
fi
----------------------------------------
while the second has:
----------------------------------------
case "$1" in
configure|triggered)
# We remove leftover generated file from previous plymouth version. Can be removed on xenial+1
if dpkg --compare-versions "$2" le-nl "1:16.04ubuntu1~"; then
rm -f /lib/plymouth/themes/kubuntu-text/kubuntu-text.plymouth
fi
----------------------------------------
postinst configure old-version
After the package was installed.
postinst triggered trigger-name...
After the package was triggered.
The actual "bad syntax" message is then generated because
dpkg --compare-versions "$2" le-nl "1:16.04ubuntu1~"
resolves to
dpkg --compare-versions "/etc/lsb-release" le-nl "1:16.04ubuntu1~"
which is of course not what dpkg expects ("/etc/lsb-release" being the trigger-name)
So the bug seems to be a missing check for "configure" in the kubuntu version of the plymouth-theme postinst script.
Also Ubuntu 18.04.1 LTS here.
I tracked down the issue to the plymouth- theme-kubuntu- text.postinst script:
Comparing /var/lib/ dpkg/info/ plymouth- theme-ubuntu- text.postinst and /var/lib/ dpkg/info/ plymouth- theme-kubuntu- text.postinst we see that the first has:
------- ------- ------- ------- ------- ----- triggered)
rm -f /lib/plymouth/ themes/ ubuntu- text/ubuntu- text.plymouth ------- ------- ------- ------- -----
case "$1" in
configure|
if [ "$1" = "configure" ]; then
# We remove leftover generated file from previous plymouth version. Can be removed on xenial+1
if dpkg --compare-versions "$2" le-nl "0.9.2-3ubuntu1~"; then
fi
fi
-------
while the second has:
------- ------- ------- ------- ------- ----- triggered) themes/ kubuntu- text/kubuntu- text.plymouth ------- ------- ------- ------- -----
case "$1" in
configure|
# We remove leftover generated file from previous plymouth version. Can be removed on xenial+1
if dpkg --compare-versions "$2" le-nl "1:16.04ubuntu1~"; then
rm -f /lib/plymouth/
fi
-------
Notice the missing check for the "configure" argument. Also see http:// man7.org/ linux/man- pages/man5/ deb-postinst. 5.html:
postinst configure old-version
After the package was installed.
postinst triggered trigger-name...
After the package was triggered.
The actual "bad syntax" message is then generated because
dpkg --compare-versions "$2" le-nl "1:16.04ubuntu1~"
resolves to
dpkg --compare-versions "/etc/lsb-release" le-nl "1:16.04ubuntu1~"
which is of course not what dpkg expects ("/etc/lsb-release" being the trigger-name)
So the bug seems to be a missing check for "configure" in the kubuntu version of the plymouth-theme postinst script.