See attachment. It fixes the speed issue, hence it makes the lstat() call to check the file under the chroot.
To be applied on the top of my previous patch. I still haven't tested other possible issues with --root such as whether the config file replacement goes perfectly. -- Egmont
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=281057 diff -Naur dpkg-1.10.24.orig/main/processarc.c dpkg-1.10.24/main/processarc.c --- dpkg-1.10.24.orig/main/processarc.c 2004-11-13 13:35:58.000000000 +0100 +++ dpkg-1.10.24/main/processarc.c 2004-11-18 17:43:26.000000000 +0100 @@ -60,7 +60,7 @@ static char *cidirbuf=0, *reasmbuf=0; static struct fileinlist *newconffiles, *newfileslist; static enum pkgstatus oldversionstatus; - static struct varbuf infofnvb, fnvb, depprobwhy; + static struct varbuf infofnvb, fnvb, cfnvb, depprobwhy; static struct tarcontext tc; int c1, r, admindirlen, i, infodirlen, infodirbaseused, status; @@ -622,7 +622,12 @@ for (cfile = newfileslist; cfile; cfile = cfile->next) { struct stat st_tmp; if (!cfile->namenode->filestat) { - if (lstat(cfile->namenode->name, &st_tmp)) { + varbufreset(&cfnvb); + varbufaddstr(&cfnvb,instdir); + varbufaddc(&cfnvb,'/'); + varbufaddstr(&cfnvb,cfile->namenode->name); + varbufaddc(&cfnvb,0); + if (lstat(cfnvb.buf, &st_tmp)) { cfile->namenode->filestat= 0; continue; } else {

