[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#36427: dpkg corrupts its status files



Package: dpkg
Version: 1.4.0.34

Sometimes when I run dpkg it aborts saying that either /var/lib/dpkg/status
or /var/lib/dpkg/available is corrupt. It happened already 3 times to me.
There were problems while using dpkg to remove, install and build a package.
Every time the corrupt entry was similar. Here is  transcript of a session:

root@lo4: ## dpkg -i qmail-src_1.02-1.deb
Selecting previously deselected package qmail-src.
(Reading database ... 28952 files and directories currently installed.)
Unpacking qmail-src (from qmail-src_1.02-1.deb) ...
Setting up qmail-src (1.02-1) ...

To build qmail binary package, you have to run

         build-qmail

Press ENTER to continue...

------------------------------------------------------------------------
[as you see this time everything went OK, but the very next command i ran
caused the error:]
------------------------------------------------------------------------

root@lo4: ## build-qmail

This script unpacks the qmail source into a directory, and
compiles it to produce a binary qmail*.deb file.

The directory where this is done will end up containing the source
and package files for the qmail binary package, along with a
directory containing the unpacked source.

Enter a directory where you would like to do this [/tmp/qmail]
/var/tmp/qmail-building
/var/tmp/qmail-building already exists, should I use it anyway ? [yN] y
no utmp entry available, using value of LOGNAME ("root") at
/usr/lib/dpkg/controllib.pl line 40.
dpkg-source: extracting qmail in qmail-1.02

no utmp entry available, using value of LOGNAME ("root") at
/usr/lib/dpkg/controllib.pl line 40.
dpkg-source: extracting qmail in qmail-1.02

Binary package qmail will be compiled now
This can take long time, depending on your machine

Press ENTER to continue...
test "Whoami" = root
if fgrep QMAIL/bin *.sh >/dev/null; then \
    echo >&2 "You must run debian/debianize-source-tree first!"; \
    exit 1; \
fi
make man
make[1]: Entering directory /var/tmp/qmail-building/qmail-1.02'
----------------------------------
[... and so on ]

now everything compiles smoothly

[... when suddenly:]
----------------------------------
gzip -9fr debian/tmp/usr/doc/ debian/tmp/usr/man/
install -m 644 -p debian/copyright debian/tmp/usr/doc/qmail/copyright
chmod go+rx debian/tmp/usr/*bin/*
chown -R root.root debian/tmp/usr/man
install -p -m755 debian/postinst debian/preinst \
                debian/prerm debian/postrm        debian/tmp/DEBIAN
install -o root -g root -m 644 -p debian/conffiles
debian/tmp/DEBIAN/conffiles
dpkg-shlibdeps -Tdebian/substvars debian/tmp/usr/lib/qmail/*
debian/tmp/usr/sbin/* debian/tmp/usr/bin/*
no utmp entry available, using value of LOGNAME ("root") at
/usr/lib/dpkg/controllib.pl line 40.
dpkg: parse error, in file /var/lib/dpkg/available' near line 44845 package
Libc6-doc':
 newline in field name Sectionololdlibs'
dpkg-shlibdeps: failure: dpkg --search gave error exit status 2
make: *** [binary-arch] Error 11
---------------------------------------------------------------

I edited the file and here is what i have found on the reported line:

Package: libc6-doc
Priority: extra
Sectionololdlibs
Installed-Size: 2
Maintainer: Joel Klecker and others <debian-glibc@lists.debian.org>
Architecture: i386
Source: glibc
Version: 2.0.7.19981211-5

this one (similarily to the other ones) was trivial to fix but i doubt if a
begginer could cope with it :(

after fixing the file the second attempt to build-qmail went with no
problems at all.

The problem is hard to isolate because i have not done anything to the
packages in which entries dpkg reported errors. (I had installed libc6-doc
with the distribution a few days ago and since then have not done anything
about it!)

I am using Debian 2.1 installed from scratch with no changes at all so libc6
is 2.0.7.19981211 and kernel is 2.0.36.

Hope you'll fix it soon, it's kinda scary to know that dpkg could remove any
package instead of the requested.

---------------------------
Marcin Owsiany
porridge@lo4.ids.bielsko.pl
---------------------------


Reply to: