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

dpkg NMU for slink



All right, at the urgings of the Evil IRC Daemons (you know who you
are), I've gone and uploaded an NMU of dpkg.  It fixes one minor bug
about compiling with egcs; by popular demand it fixes the getlogin()
warnings in controllib.pl (by using stderr for a tty).  Most
importantly, though, it works on powerpc and glibc 2.1 which other
versions really do not.

It now uses lchown() if present, as tar does - this is vital if
compiling with a libc built on 2.1.10x headers, as powerpc libc is.  It
also adds an fgetpos() / fsetpos() pair in dpkg-deb/extract.c which
absolutely should not be necessary, and indicate a serious bug - if I
could figure out whether it was libc's or the kernel's fault I would
file a bug.  The bug exists in libc pre-2.1 snapshots using kernels
after 2.1.24 somewhere (the change entered the tree somewhere before
2.1.42 IIRC).  It only occurs if the file being read is on an ext2 file
system.  Here's a sample of it:

#include <stdio.h>

main()
{
	fpos_t		fpos;
	FILE		*file;
	int		i;
	
	file = fopen("test.c", "r"); /* Some file more than 1K */
	if(!file)
		abort();
	fgetpos(file, &fpos);
	fprintf(stderr, "File position is %ld before read.\n", fpos);
	i = 0;
	while(i++ < 1022)
		(void)fgetc(file);
	fgetpos(file, &fpos);
	fprintf(stderr, "File position is %ld after read.\n", fpos);
	fflush(file);
	fgetpos(file, &fpos);
	fprintf(stderr, "File position is %ld after fflush.\n", fpos);
}


The fpos's should be 0, 1022, and 1022; if the file is small, for me,
they are instead 0, 1022, and the length of the file.  The cutoff
varies and is about 4k.  That's right, fflushing a read-only file moves
the fpos.  Ideas?


Dan


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: