dpkg giving warning about '/etc/lsb-release' version number not starting with a digit when there is no apparent problem in the file

Bug #1597466 reported by Wise Melon
162
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Invalid
Undecided
Unassigned
kubuntu-settings (Ubuntu)
Fix Released
High
Unassigned
Xenial
Invalid
High
Unassigned
Eoan
Fix Released
High
Unassigned
ubuntu-gnome-default-settings (Ubuntu)
Fix Released
Undecided
Adam Conrad
Xenial
Invalid
Undecided
Unassigned
Eoan
Fix Released
Undecided
Adam Conrad

Bug Description

I have recently noticed (though I believe that during the upgrade from Ubuntu GNOME 15.10 to 16.04 I spotted the message when it got to the point of updating the '/etc/lsb-release' file) that sometimes
during an 'apt-get dist-upgrade' operation or similar that dpkg outputs this warning:

    dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with a digit

The contents of my 'lsb-release' file is:

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=16.04
    DISTRIB_CODENAME=xenial
    DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

So I assume that this is a dpkg bug as this was the standard file and I don't see any problems in it (I have also compared it to the one on 14.04 and it is in the same format).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dpkg (Ubuntu):
status: New → Confirmed
Revision history for this message
Bruce Pieterse (octoquad) wrote :

I've also seen this, but it occurred shortly after installing updates for the plymouth theme for ubuntu gnome. Unfortunately, I am unable to reproduce the issue.

Changed in ubuntu-gnome:
status: New → Confirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

I think this was a bug that was fixed in plymouth several months ago, but it's hard to tell without seeing a longer log of your apt output (/var/log/apt/term.log* should contain the error, and context).

Revision history for this message
Bruce Pieterse (octoquad) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :

Thanks for the log. Fix uploaded to yakkety, will SRU to xenial a bit later.

Changed in ubuntu-gnome:
status: Confirmed → Invalid
affects: dpkg (Ubuntu) → ubuntu-gnome-default-settings (Ubuntu)
Adam Conrad (adconrad)
Changed in ubuntu-gnome-default-settings (Ubuntu):
status: Confirmed → Fix Committed
Changed in ubuntu-gnome-default-settings (Ubuntu Xenial):
status: New → Confirmed
Changed in ubuntu-gnome-default-settings (Ubuntu):
assignee: nobody → Adam Conrad (adconrad)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-gnome-default-settings - 16.10.1

---------------
ubuntu-gnome-default-settings (16.10.1) yakkety; urgency=medium

  * Synchronize plymouth-theme-ubuntu-gnome-text postinst with the postinst
    from plymouth-theme-ubuntu-text to fix erroneous output (LP: #1597466)
  * Append a VERSION string to plymouth-theme-ubuntu-gnome-text's title to
    give the regex something to anchor on and correctly append the version.

 -- Adam Conrad <email address hidden> Tue, 05 Jul 2016 02:13:40 -0600

Changed in ubuntu-gnome-default-settings (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :

Glad this issue was fixed, I hope that you get the time to SRU it to Xenial soon.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

I think its affected plymouth-theme-kubuntu-text postinst too. Please find the attached screenshot

Revision history for this message
cascagrossa (cascagrossa-cascao) wrote :

I can confirm #8. Received the same output while today's upgrade plymouth-theme-kubuntu-text, package "9.4 base-files" to "9.4.4 base-files".

Revision history for this message
Erik M (knut-erik-villamehus) wrote :

Fix hasn't reached Xenial just yet.

Revision history for this message
Harald H. (haarektrans) wrote :

Still not fixed in Xenial.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug also exists in artful in kubuntu-settings:

Processing triggers for plymouth-theme-kubuntu-text (1:17.10ubuntu3) ...
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit

tags: added: artful
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kubuntu-settings (Ubuntu Xenial):
status: New → Confirmed
Changed in kubuntu-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
Francesco (sputnik63) wrote :

Also present in Kubuntu 17.04
Here the log (italian language):

Elaborazione dei trigger per plymouth-theme-kubuntu-text (1:17.04ubuntu6)...
dpkg: attenzione: version '/etc/lsb-release' has bad syntax: il numero di versione non inizia con una cifra
My /etc/lsb-release content:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"

Steve Langasek (vorlon)
Changed in kubuntu-settings (Ubuntu):
importance: Undecided → High
Changed in kubuntu-settings (Ubuntu Xenial):
importance: Undecided → High
Revision history for this message
Mark Fraser (launchpad-mfraz) wrote :

Still present in 18.04
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with a digit
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

Revision history for this message
Mark Fraser (launchpad-mfraz) wrote :

This was when updating base-files
Preparing to unpack .../base-files_10.1ubuntu2.1_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (10.1ubuntu2.1) over (10.1ubuntu2) ...
Setting up base-files (10.1ubuntu2.1) ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
Installing new version of config file /etc/lsb-release ...
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.3-1ubuntu7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for cracklib-runtime (2.9.2-5build1) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for plymouth-theme-kubuntu-text (1:18.04ubuntu11) ...
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with a digit
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-29-generic

Revision history for this message
Reinaldo Nolasco Sanches (reinaldo-sanches) wrote :

Ubuntu 18.04.1 LTS

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

-------------------------------------------------
  Processing triggers for plymouth-theme-kubuntu-text (1:18.04ubuntu11) ...
  dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit
  rmdir: failed to remove '/lib/plymouth/': No such file or directory
  update-initramfs: deferring update (trigger activated)
  Setting up kde-cli-tools-data (4:5.12.6-0ubuntu0.1) ...
  Processing triggers for dbus (1.12.2-1ubuntu1) ...
  Setting up drkonqi (5.12.6-0ubuntu0.1) ...
  Setting up console-setup-linux (1.178ubuntu2.2) ...
  Setting up fonts-beng-extra (1.0-6ubuntu0.1) ...
  Setting up kwrited (4:5.12.6-0ubuntu0.1) ...
-------------------------------------------------

Revision history for this message
Carsten Juttner (carjay) wrote :

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:

----------------------------------------
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
----------------------------------------

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.

Revision history for this message
Mauro (jasmines) wrote :

Still present 18.04.01 LTS

Revision history for this message
Fredrik Normann (smartypants) wrote :

Saw this today:

sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  base-files libmozjs-52-0
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,946 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://no.archive.ubuntu.com/ubuntu bionic-updates/main amd64 base-files amd64 10.1ubuntu2.2 [58.2 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libmozjs-52-0 amd64 52.9.1-0ubuntu0.18.04.1 [5,887 kB]
Fetched 5,946 kB in 1s (4,039 kB/s)
(Reading database ... 337169 files and directories currently installed.)
Preparing to unpack .../base-files_10.1ubuntu2.2_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (10.1ubuntu2.2) over (10.1ubuntu2.1) ...
Setting up base-files (10.1ubuntu2.2) ...
Installing new version of config file /etc/update-motd.d/50-motd-news ...
motd-news.service is a disabled or a static unit, not starting it.
(Reading database ... 337169 files and directories currently installed.)
Preparing to unpack .../libmozjs-52-0_52.9.1-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libmozjs-52-0:amd64 (52.9.1-0ubuntu0.18.04.1) over (52.8.1-0ubuntu0.18.04.1) ...
Setting up libmozjs-52-0:amd64 (52.9.1-0ubuntu0.18.04.1) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.3-1ubuntu7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for cracklib-runtime (2.9.2-5build1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for plymouth-theme-kubuntu-text (1:18.04ubuntu11) ...
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit
rmdir: failed to remove '/lib/plymouth/': No such file or directory
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.2pop3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-32-generic

Revision history for this message
Anatoly Borodin (anatoly.borodin) wrote :

Here is a simple patch based on plymouth-theme-ubuntu-text.install that fixes both

    dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit

and

    rmdir: failed to remove '/lib/plymouth/': No such file or directory

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Sync-plymouth-theme-kubuntu-text.install-with-plymout.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
elichai2 (elichai2) wrote :

Same problem in 18.04 Kubuntu:
`dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit `

```
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
```

Revision history for this message
sasha1024 (sasha1024) wrote :

Got this when setting up base-files (10.1ubuntu2.4) in Ubuntu 18.04.2 LTS.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug still exists in Ubuntu 19.04/disco:

# apt install --reinstall base-files
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 60.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu disco/main amd64 base-files amd64 10.1ubuntu8 [60.1 kB]
Fetched 60.1 kB in 0s (568 kB/s)
(Reading database ... 739533 files and directories currently installed.)
Preparing to unpack .../base-files_10.1ubuntu8_amd64.deb ...
Warning: Stopping motd-news.service, but it can still be activated by:
  motd-news.timer
Unpacking base-files (10.1ubuntu8) over (10.1ubuntu8) ...
Setting up base-files (10.1ubuntu8) ...
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for cracklib-runtime (2.9.6-2) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.4-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for plymouth-theme-kubuntu-text (1:19.04ubuntu4) ...
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit

tags: added: bionic disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kubuntu-settings - 1:19.10ubuntu2

---------------
kubuntu-settings (1:19.10ubuntu2) eoan; urgency=medium

  * debian/plymouth-theme-kubuntu-text.postinst: Take changes from Ubuntu
    text theme postinst script.
    - Make rmdir 'less noisy'.
    - Only clean up old generated file on configure. (LP: #1597466)

 -- Rik Mills <email address hidden> Tue, 04 Jun 2019 17:47:53 +0100

Changed in kubuntu-settings (Ubuntu Eoan):
status: Confirmed → Fix Released
Revision history for this message
Owen (osavill-z) wrote :

Just seen this in 19.04, I'll look for it when I next do an update on 19.10. Could this be back-ported to 19.04?

Revision history for this message
Jorma Hytonen (jormahytonen) wrote :

Date: 19.7.2019 (7/19/2019)
sudo apt upgrade

And first time I get:
dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit

Jorma Hytönen

Revision history for this message
Thomas Bernhart (thomascbernhart) wrote :

I got the same error on Kubuntu Bionic (18.04) german while performing an apt upgrade:

dpkg: Warnung: Version »/etc/lsb-release« hat falsche Syntax: Versionsnummer beginnt nicht mit einer Ziffer

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

Kubuntu 18.04 is not listed as affected till now.

Revision history for this message
Carl Nobile (cnobile1) wrote :

This has shown up again in 18.04.

dpkg: warning: version '/etc/lsb-release' has bad syntax: version number does not start with digit

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Revision history for this message
Tonio20 (fa268838) wrote :

when the last update on Kubuntu 18.04.2 around 18.04.3, I have this following message:

dpkg: warning: bad syntax of the version "/etc/lsb-release": the version number does not start with a number
rmdir: impossible to delete '/lib/plymouth/': No such file or folder

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Revision history for this message
Paul White (paulw2u) wrote :

Ubuntu 16.04 (xenial) reached end-of-life on April 29, 2021.

Changed in kubuntu-settings (Ubuntu Xenial):
status: Confirmed → Invalid
Changed in ubuntu-gnome-default-settings (Ubuntu Xenial):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.