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 on 2016-06-29
152
This bug affects 30 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Undecided
Unassigned
kubuntu-settings (Ubuntu)
Status tracked in Eoan
Xenial
High
Unassigned
Eoan
High
Unassigned
ubuntu-gnome-default-settings (Ubuntu)
Status tracked in Eoan
Xenial
Undecided
Unassigned
Eoan
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).

Launchpad Janitor (janitor) wrote :

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

Changed in dpkg (Ubuntu):
status: New → Confirmed
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
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).

Bruce Pieterse (octoquad) wrote :
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) on 2016-07-05
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)
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

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

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

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

Erik M (knut-erik-villamehus) wrote :

Fix hasn't reached Xenial just yet.

Harald H. (haarektrans) wrote :

Still not fixed in Xenial.

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
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
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) on 2018-07-23
Changed in kubuntu-settings (Ubuntu):
importance: Undecided → High
Changed in kubuntu-settings (Ubuntu Xenial):
importance: Undecided → High
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"

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

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

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.

Mauro (jasmines) wrote :

Still present 18.04.01 LTS

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

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

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

sasha1024 (sasha1024) wrote :

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

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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers