Bogus chars in "available" file after upgrade

Bug #64012 reported by Mike
6
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: update-manager

I've updated dapper drake to edgy and all went well. One problem though... Update manager will search for packages, download them but when it comes to install them it prompts this error:

Preconfiguring packages ...
dpkg: parse error, in file `/var/lib/dpkg/available' near line 2 package `python-pyxattr':
 value for `status' field not allowed in this context
E: Sub-process /usr/bin/dpkg returned an error code (2)

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Can you please attach the files from /var/log/dist-upgrade/* to this bugreport? And a (gziped) copy of /var/lib/dpkg/info/available

thanks,
 Michael

Changed in update-manager:
importance: Undecided → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Mike (avramti) wrote :
Revision history for this message
Mike (avramti) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for these files.

The available files looks nasty and is corupted. That smells like bad RAM or a problem with the harddisk.

Could you please check that?

Thanks,
 Michael

Revision history for this message
Michael Vogt (mvo) wrote :

The upgrade log itself looks good.

You may be able to fix the available file by opening it as root (via sudo) in a text-editor and remove the strange lines at the beginning after "Python-version: all"

Revision history for this message
Mike (avramti) wrote :

I've tried opening available with gedit but apperently it didn't work (even with root) (it reported that it didn't recognize the encoding in the file).
I managed to solve this by deleting line 2 and 8 from the file and now everything is back to normal.
I was just wondering... Could this be from the fact that when the upgrade from Dapper to Edgy finished, I choosed to remove some files that it said it weren't supported anymore?

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for confirming that it works again for you.

This error can't be related to the removal of the no-longer supported packages. It is either a bug in dpkg or a problem with your hardware (RAM, file-system-corruption). I suspect something with the hardware as we haven't got any other report like this.

I will close this bugreport now, but I will keep it in mind and reopen if I come accross another corrupted available file.

Thanks,
 Michael

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 64012] Bogus chars in "available" file after upgrade

Mike writes ("[Bug 64012] Bogus chars in "available" file after upgrade"):
> Preconfiguring packages ...
> dpkg: parse error, in file `/var/lib/dpkg/available' near line 2 package `python-pyxattr':
> value for `status' field not allowed in this context
> E: Sub-process /usr/bin/dpkg returned an error code (2)

This is very strange. Are you sure you haven't been messing manually
with /var/lib/dpkg/available ?

Ian.

Revision history for this message
Chris Conway (cconway) wrote :

I'm having a similar problem after running the Update Manager on 15 Jan 2007. apt-get failed after upgrading libkrb53 and before upgrading vino.

$ dpkg -l vino
dpkg-query: parse error, in file `/var/lib/dpkg/available' near line 13899 package `python-newt':
 invalid package name (character `,' not allowed (only letters, digits and characters `-+._'))

The relevant entry in /var/lib/dpkg/availabe is:

Package: python-newt
Priority: standard
Section: python
Installed-Size: 132
Maintainer: Alastair McKinstry <email address hidden>
Architecture: i386
Source: newt
Version: 0.52.2-51unu
Size: 36954
Description: A NEWT module for Python
 This module allows you to built a text UI for your Python scripts
 using newt.
: python2.4-newt, pythGenuineIntelepends: libnewt0.52 (= 0.52.2-5.1ubuntu1), python (<< 2.5), python (>= 2.3)
Python-Version: 2.4, 2.3

I can guarantee that I have *not* edited this file by hand (but I will now)

Revision history for this message
Patrick Salami (pat-entitycom) wrote :

I have the same problem running Feisty 7.10 on a custom-built Intel Pentium D. I was using apt-get autoremove to clean out uneeded packages when my system crashed and I had to restart; I've been having problems with my hard drive (Western Digital Raptor / WDC WD1500ADFD-0 Version: 20.0) and fsck revealed a lot of bad sectors, so I'm pretty sure that the file did in fact get corrupted when I had to reset my system during apt-get's operation.
Here is my error message (the 'available' file (889K) is attached as well; there is binary code at the end and in the middle, so I'm going to restore the file from backup and see what happens):

freerick@freerick-desktop:~$ uname -a
Linux freerick-desktop 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 GNU/Linux

freerick@freerick-desktop:~$ sudo apt-get install clamav
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  lha clamav-docs
The following NEW packages will be installed:
  clamav
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/874kB of archives.
After unpacking 1323kB of additional disk space will be used.
dpkg: parse error, in file `/var/lib/dpkg/available' near line 1:
 field name `79435.442510]' must be followed by colon
Running prelink, please wait...
E: Sub-process /usr/bin/dpkg returned an error code (2)

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

[Expired for dpkg (Ubuntu) because there has been no activity for 60 days.]

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.