Blank line in previously installed packagedescription causes 12.04 upgrade failure

Bug #916799 reported by D. Wegener
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
dpkg
New
Undecided
Unassigned
dpkg (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

While attempting to upgrade from 11.10 to 12.04 the version of dpkg used by Ubuntu was upgraded. The new version was unable to parse my /var/lib/dpkg/status and /var/lib/dpkg/available files. Under 11.10, I had installed a package from Lexmark for a printer driver that had a blank line in the package description field. The old version of dpkg was apparently able to parse the file with the blank line. However, when the new version encountered the files. any further package updates failed and the update process proceeded to the cleanup/reboot phase.

My system was usable following the reboot, and I was able to find the blank lines and manually edit them to allow dpkg to start working again. There were some broken packages as a result of the failed upgrade. I was able to fix them using apt-get install -f. I was then able to complete the upgrade with an apt-get dist-upgrade.

There may need to be some checks added to the upgrade procedure to prevent upgrade failures when a package description has a blank line.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: dpkg 1.16.1.2ubuntu5
ProcVersionSignature: Ubuntu 3.2.0-8.15-generic 3.2.0
Uname: Linux 3.2.0-8-generic i686
ApportVersion: 1.90-0ubuntu2
Architecture: i386
CheckboxSubmission: 21a3f7508cdc22a53dbe8d10fbb1ff75
CheckboxSystem: 9c26adf6eed2f681ba41f94dd24c07e4
Date: Sun Jan 15 08:53:36 2012
InstallationMedia: Ubuntu-Netbook 10.04 "Lucid Lynx" - Beta i386 (20100318)
SourcePackage: dpkg
UpgradeStatus: Upgraded to precise on 2012-01-15 (0 days ago)

Revision history for this message
D. Wegener (dpwegener) wrote :
Revision history for this message
Raphaël Hertzog (hertzog) wrote : Re: [Bug 916799] [NEW] Blank line in previously installed packagedescription causes 12.04 upgrade failurt

Hello,

On Sun, 15 Jan 2012, D. Wegener wrote:
> While attempting to upgrade from 11.10 to 12.04 the version of dpkg used
> by Ubuntu was upgraded. The new version was unable to parse my
> /var/lib/dpkg/status and /var/lib/dpkg/available files. Under 11.10, I
> had installed a package from Lexmark for a printer driver that had a
> blank line in the package description field. The old version of dpkg
> was apparently able to parse the file with the blank line. However,
> when the new version encountered the files. any further package updates
> failed and the update process proceeded to the cleanup/reboot phase.

Can you provide this package ?

It seems weird because I don't think that dpkg ever allowed a blank line
in the description field. A blank line means that it will begin to parse a
new entry and as such it will complain because the new entry does not
begin with a field.

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/

Revision history for this message
D. Wegener (dpwegener) wrote : Re: Blank line in previously installed packagedescription causes 12.04 upgrade failurt

The package is provided by Lexmark for their printers. It is licensed by them and I'm not sure I'm allowed to post it here. The version I had installed no longer appears to be available on their support site.

I could probably send the file to you directly, but I don't think I'm allowed to post it on the site.

Their installation package is shipped an a self extracting shell script with the .deb packaged inside. Attempting to re-install the package now produces the following error:

dpkg: error processing lexmark-inkjet-09-driver-1.5-1.i386.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 9 package 'lexmark-inkjet-09-driver':
 blank line in value of field 'Description'
Errors were encountered while processing:
 lexmark-inkjet-09-driver-1.5-1.i386.deb

Running dpkg --info on the .deb produces the following:

 Package: lexmark-inkjet-09-driver
 Version: 1.5-1
 Section: non-free
 Priority: optional
 Architecture: i386
 Installed-Size:
 Maintainer: build <build@linux>
 Description:
  Lexmark Series Drivers Package

  This package contains the Lexmark Series Drivers. This is
  a copyrighted package, please refer to the copyright notice
  for details about using this product.

The blank line appears after the first line of the Description.

Here is how the packages entry appears in the status file prior to the upgrade:

Package: lexmark-inkjet-09-driver
Status: install ok installed
Priority: optional
Section: non-free
Maintainer: build <build@linux>
Architecture: i386
Version: 1.5-1
Description:
 Lexmark Series Drivers Package

 This package contains the Lexmark Series Drivers. This is
 a copyrighted package, please refer to the copyright notice
 for details about using this product.

Again the blank line appears in the description.

Editing the file doesn't show any other characters on the line (no tabs, spaces, etc) It appears to be just a new line.

Revision history for this message
D. Wegener (dpwegener) wrote :

Here is the control file from the package with the description

Revision history for this message
D. Wegener (dpwegener) wrote :

Last 50 lines of term.log file from dist-upgrade when failure occurred. Failure is right after dpkg was upgraded from 1.16.0.3ubuntu5 to 1.16.1.2ubuntu5

Revision history for this message
Raphaël Hertzog (hertzog) wrote :

Ok, thanks for the supplementary input. There's nothing we can do on the dpkg side since we're now properly rejecting the package... I'm reassigning it to update-manager since that's where special upgrade checks are put. But it will be difficult to detect in the general case. But it might be possible to remove that specific package prior to the upgrade.

affects: dpkg (Ubuntu) → update-manager (Ubuntu)
summary: Blank line in previously installed packagedescription causes 12.04
- upgrade failurt
+ upgrade failure
Changed in update-manager (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Audrey Durand (adurand) wrote :

Same thing happened to me with the package "xmind".

Revision history for this message
Roberto (roby-programmer) wrote :
Download full text (8.5 KiB)

Same sistuation here, upgraded my linux box from kubuntu 11.10 to 12.04 LTS get same error on a package "crssiss-pdl-cittadino".
Now I have a system that isn't fully upgraded (I don't get any error durring the operation, all was fine), and can't do apt-get -f install or apt-get dist-upgrade to resolve the conflict or upgrade my systems.

here the is what I get with apt-get -f install

dpkg: errore: analisi del file "/var/lib/dpkg/status" vicino alla riga 11964 pacchetto "crssiss-pdl-cittadino":
 blank line in value of field 'Description'
Error org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct
E: Sub-process /usr/bin/dpkg returned an error code (2)

here what I get when I do apt-get dist-upgrade

gnome-control-center : Dipende: libgnome-control-center1 (>= 1:3.3.5) ma la versione 1:3.2.2-0ubuntu1 è installata
                        Dipende: libwacom2 (>= 0.3) ma non è installato
                        Raccomanda: indicator-sound (>= 0.8.1) ma la versione 0.7.9-0ubuntu2.1 è installata
                        Raccomanda: indicator-power (>= 1.90) ma la versione 0.9-0ubuntu2 è installata
 gnome-settings-daemon : Dipende: libappindicator3-1 (>= 0.4.90) ma la versione 0.4.1-0ubuntu2 è installata
                         Dipende: libgnome-desktop-3-2 (>= 3.3.4) ma la versione 3.2.1-0ubuntu1.1 è installata
                         Dipende: libwacom2 (>= 0.3) ma non è installato
 gstreamer0.10-alsa : Dipende: libgstreamer0.10-0 (>= 0.10.36) ma la versione 0.10.35-1 è installata
                      Dipende: libgstreamer-plugins-base0.10-0 (>= 0.10.36) ma la versione 0.10.35-1 è installata
 gstreamer0.10-plugins-base : Dipende: libgstreamer0.10-0 (>= 0.10.36) ma la versione 0.10.35-1 è installata
                              Dipende: libgstreamer-plugins-base0.10-0 (>= 0.10.36) ma la versione 0.10.35-1 è installata
 gvfs-backends : Dipende: libarchive12 ma non è installato
                 Dipende: libcdio-cdda1 ma non è installato
                 Dipende: libcdio-paranoia1 ma non è installato
                 Dipende: libcdio13 ma non è installato
 kde-runtime : Dipende: plasma-scriptengine-javascript (= 4:4.8.2-0ubuntu2) ma la versione 4:4.8.2-0ubuntu1~ppa1~oneiric1 è installata
 libegl1-mesa-drivers : Dipende: libglapi-mesa (= 8.0.2-0ubuntu3) ma la versione 7.11-0ubuntu3.2 è installata
 libgl1-mesa-dev : Dipende: libgl1-mesa-glx (= 8.0.2-0ubuntu3) ma la versione 7.11-0ubuntu3.2 è installata
 libldap2-dev : Dipende: libldap-2.4-2 (= 2.4.28-1.1ubuntu4) ma la versione 2.4.25-1.1ubuntu4.1 è installata
 libqt4-dbg : Dipende: libqtcore4 (= 4:4.8.1-0ubuntu4) ma la versione 4:4.8.1-0ubuntu2~oneiric1~ppa2 è installata
 libqt4-dbus : Dipende: libqt4-xml (= 4:4.8.1-0ubuntu4) ma la versione 4:4.8.1-0ubuntu2~oneiric1~ppa2 è installata
               Dipende: libqtcore4 (= 4:4.8.1-0ubuntu4) ma la versione 4:4.8.1-0ubuntu2~oneiric1~ppa2 è installata
 libqt4-declarative : Dipende: libqt4-sql (= 4:4.8.1-0ubuntu4) ma la versione 4:4.8.1-0ubuntu2~oneiric1~ppa2 è installata
                      Dipende: libqtcore4 (= 4:4.8.1-0ubuntu4) ma la versione 4:4.8.1-0ubuntu2~oneiric1~ppa2 è installata
 libqt4-declarati...

Read more...

Revision history for this message
Ben Hearsum (bhearsum) wrote :

I hit this problem with the Ubuntu provided package 'bricsysadv11'. I fixed it by removing its entries from /var/lib/dpkg/status and available.

Ivan Ivanov (ivan-lz)
affects: update-manager (Ubuntu) → dpkg (Ubuntu)
Revision history for this message
Meghan Pietila (phishlady) wrote :

In case it saves someone else Googling - after editing the /var/lib/dpkg/available file, running sudo dpkg --configure -a will reload the information so you can continue.

Revision history for this message
lrkwz (luca-orlandi) wrote :

same with packages skypewrapper and the one installed through

deb http://cartaservizi.regione.fvg.it/debian insiel main

sudo apt-get update

sudo apt-get install libp11cns-mozilla2

Revision history for this message
lrkwz (luca-orlandi) wrote :

editing /var/lib/dpkg/available and /var/lib/dpkg/status fixed the problem(s)

Revision history for this message
tsbertalan (09rp9wq1q-tom-anzd5soo2) wrote :

A blank line is a pretty non-unique thing to use as a separator between entries for dpkg. Maybe it would be better for dpkg to use the combination of (1) a blank line, and (2) the text "Package:***" to indicate a new entry? At the very least, a whole upgrade shouldn't fail because of this.

Revision history for this message
Greg Rundlett (greg.rundlett) wrote :

I ran into the same problem, and I'm NOT doing a dist-upgrade, just a routine update of packages.

I'm getting the blank line error for the package XMind. I solved the problem by deleting the offending lines and applying the package updates. I agree that using an empty line as a record separator seems easy to run afoul of, so at a minimum the regex / parser of the file should be more capable at identifying a record

dpkg-query: error: parsing file '/var/lib/dpkg/status' near line 30690 package 'xmind':
 blank line in value of field 'Description'
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: error: parsing file '/var/lib/dpkg/status' near line 30690 package 'xmind':
 blank line in value of field 'Description'
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:
dpkg: error: parsing file '/var/lib/dpkg/status' near line 30690 package 'xmind':
 blank line in value of field 'Description'

Using vi, I editted /var/lib/dpkg/status and /var/lib/dpkg/available to delete the offending blank line, marked for illustration purposes below with the text [[ ***DELETE ME ..... I AM A BLANK LINE IN THE DESCRIPTION*** ]]

Package: xmind
Priority: optional
Section: multiverse/text
Installed-Size: 43096
Maintainer: xmind <email address hidden>
Architecture: i386
Version: 3.0.3.200904291819
Depends: libgtk2.0-0 (>= 2.8.0), openjdk-6-jre | sun-java5-jre | sun-java6-jre
Size: 37004904
Description: XMind - Brainstorming and Mind Mapping
 XMind, is an open source brainstorming and mind mapping software tool
 developed by XMind Ltd. It helps people to capture ideas, organize to
 various charts, and share them for collaboration. Supporting mind maps,
 fishbone diagrams, tree diagrams, org-charts, logic charts, and even
 spreadsheets. Often used for knowledge management, meeting minutes,
 task management, and GTD. XMind is compatible with Freemind/Mindmanager.
          [[ ***DELETE ME ..... I AM A BLANK LINE IN THE DESCRIPTION*** ]]
 XMind is dual licensed under 2 open source licenses: the Eclipse Public
 License v1.0 (EPL) and the GNU Lesser General Public License v3 (LGPL).
          [[*** THIS IS AN EXPECTED BLANK LINE BETWEEN PACKAGES ***]]
Package: libcap2-bin

Revision history for this message
Francesco Chiechi (francesco-chiechi) wrote :

I had the same problem, I solved it by removing /var/lib/dpkg/available file and recreating it with
dselect update

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

This bug was fixed in the package dpkg - 1.19.4ubuntu3

---------------
dpkg (1.19.4ubuntu3) disco; urgency=medium

  * scripts/Dpkg/Source/Package.pm: use Dpkg::Source:Format (closes: #921031)

 -- Adam Conrad <email address hidden> Tue, 19 Feb 2019 07:37:22 -0700

Changed in dpkg (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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