Bug#36221: apt core-dumps on incorrect(?) Packages file
Package: apt
Version: 0.1.8
Bug report for apt-get:
System: Hamm 2.0 Beta upgraded to Slink.
Machine: Pentium-II 233Mhz
Problem description:
--------------------
symptom: apt-get receives: Segmentation fault.
source of the problem (guess): incorrect Packages file.
description:
I have created my own version of the Packages file, for .debs I
created either from `alien' (things I've compiled myself) or
from the non-free section of Slink (which I do not have on a CD-ROM,
so I brought by ftp). I assume this version is incorrect, as apt-get
fails to use it, but succeeds for Packages files I bring by ftp.
(anywhere I mention the file `Packages', it applies also to the gzipped
version of the file, `Packages.gz').
------------------------------------------------------------
wolf /root/debs 64# apt-get update
Get file:/cdrom/debian/ stable/main Packages
Get file:/root/ ./debs/ Packages
Get file:/root/ ./debs/gnome/ Packages
Fetched 18.6k in 0s (260k/s)
Updating package file cache...done
Updating package status cache...done
Checking system integrity...ok
wolf /root/debs 65# apt-get install povray
Updating package status cache...done
Checking system integrity...ok
The following extra packages will be installed:
povray-misc
The following NEW packages will be installed:
povray povray-misc
0 packages upgraded, 2 newly installed, 0 to remove and 7 not upgraded.
Segmentation fault
------------------------------------------------------------
/etc/apt/sources.list:
---------------------
deb file:/root ./debs/gnome/
deb file:/root ./debs/
deb file:/cdrom/debian stable main
---------------------
/root/debs/Packages:
---------------------
Package: egcc
Version: 2.91.66-1
Section: unknown
Priority: extra
Architecture: all
Depends: libc6
Installed-Size: 29064
Maintainer: Ariel Tankus <arielt@wolf.tankus.il>
Description: Converted Slackware tgz package
Converted Slackware tgz package
Package: octave
Version: 2.1.14-1
Section: unknown
Priority: extra
Architecture: all
Depends: libc6, ncurses3.4
Installed-Size: 66443
Maintainer: Ariel Tankus <arielt@wolf.tankus.il>
Description: Converted Slackware tgz package
Converted Slackware tgz package
Package: povray
Version: 3.0.20-8
Architecture: i386
Depends: libc6, libpng0g, zlib1g, povray-misc
Suggests: povray-doc, povray-lib
Installed-Size: 678
Maintainer: Drake Diedrich <Drake.Diedrich@anu.edu.au>
Description: Persistence of Vision raytracer
An enhanced version of the basic text-only povray raytracer. No
additional libraries are needed. Has the POV3ISO extensions:
isosurfaces and colormaps of arbitrary functions and macros.
Package: povray-lib
Version: 3.0.20-8
Architecture: i386
Depends: povray-misc
Installed-Size: 27
Maintainer: Drake Diedrich <Drake.Diedrich@anu.edu.au>
Source: povray
Description: Persistence of Vision raytracer - isopov libraries
Architecture dependent libraries for either version of povray.
The two demonstration libraries in the isosurface documentation
are included.
Package: povray-misc
Version: 3.0.20-8
Architecture: all
Conflicts: povray (<<3.0.20)
Replaces: povray
Installed-Size: 717
Maintainer: Drake Diedrich <Drake.Diedrich@anu.edu.au>
Source: povray
Description: Persistence of Vision raytracer - include files
Standard include files for either version of povray.
Package: povray-doc
Version: 3.0.20-8
Architecture: all
Depends: povray-misc
Installed-Size: 1660
Maintainer: Drake Diedrich <Drake.Diedrich@anu.edu.au>
Source: povray
Description: Persistence of Vision raytracer
The official povray documentation, POV3ISO examples, and PVMPOV
documentation.
Package: xv
Version: 3.10a-20
Architecture: i386
Depends: libc6 (>= 2.0.7u), libjpeg62, libpng2, libtiff3g, xlib6g (>= 3.3-5), zlib1g (>= 1:1.1.3)
Suggests: xv-doc
Conflicts: xvdoc
Replaces: xvdoc
Installed-Size: 895
Maintainer: Philippe Troin <phil@fifi.org>
Description: An image viewer and manipulator for the X Window System.
The xv program displays images in the GIF, JPEG, TIFF, PBM, PGM, PPM,
X11 bitmap, Utah Raster Toolkit RLE, PDS/VICAR, Sun Rasterfile, BMP,
PCX, PNG, IRIS RGB, XPM, Targa, XWD, possibly PostScript, and PM formats
on workstations and terminals running the X11 Window System.
.
The creators of the GIF format require the following
acknowledgement:
.
The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated.
---------------------
The `Packages' file was created by the following script (`update_packages'):
---------------------
#!/bin/csh -f
#
# Update the Packages file for apt to know the new package.
#
# Usage:
#
# update_packages package.deb
#
# where package.deb is a debian package name.
#
# Author: Ariel Tankus.
# Created: 7.4.1999.
set tmpdir = /tmp/tmp_dpkg_control_files_$1_$$
mkdir $tmpdir
if (-e Packages.gz) then
zcat Packages.gz > $tmpdir/Packages
else
/bin/echo -n '' > $tmpdir/Packages
endif
dpkg --control $1 $tmpdir
cat $tmpdir/Packages $tmpdir/control >! Packages
/bin/echo >> Packages
gzip -f Packages
rm -rf $tmpdir
---------------------
This script probably produces output which is not compliant with
the expected format of Packages, however the `apt-get update' does
not shout anything about it, and a Segmentation fault is not the good
way to die. ;)
(BTW, I'll be glad if someone could refer me to the correct script
for creating a `Packages' file... arielt@math.tau.ac.il).
-- Ariel.
---
Ariel Tankus
Department of Computer Science
Tel-Aviv University
arielt@math.tau.ac.il
Reply to: