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

Bug#1744: dpkg: cannot scan updates directory `/var/lib/dpkg/updates/': No such file or directory



Ok, so here's how things look to me at present:

dpkg is failing because of an ENOENT error return from scandir(3).

scandir is getting this error value from readdir().

I do not know enough about libc to easily determine whether the
readdir() used by scandir is readdir(2) or readdir(3).  However, I
suspect it's readdir(3).

Something is happening in readdir to result in this error condition
for a loop of the form:

	DIR *dp= opendir(dir);
	while ((d= readdir(dp)) != 0) {
		...
	}

This implies that readdir is messed up.

Another possibility is that the underlying file system (umsdos) is
messed up.  But why does it only fail in scandir()?

Oddly enough perl's use of readdir (sort readdir(D)) in run-parts
seems to have no problems.

I'm not sure, at the moment, how to proceed with this problem.
scandir() fails but readdir() apparently does not, yet readdir is
apparently at fault.

I'm sure I'll be able to eventually figure things out the hard way --
by taking the code apart one step at a time while figuring out how it
works.  I'm hoping somebody will be familiar with this class of
problem and be able to just whip out the answer.

If anyone has any suggestions I'd be glad to hear them.

--
Raul


Reply to: