Package: dpkg Version: 1.14.12 Severity: normal Tags: patch --- Please enter the report below this line. --- With diverted files the "unable to create" error is confusing. In the example above, I've manually removed the /usr/lib/nvidia directory while fiddling around with nvidia drivers. The error refers to /usr/lib/xorg/modules/.. though, which is really confusing.
The debug output with -D110: D000010: tarobject ti->Name=`./usr/lib/xorg/modules/libwfb.so' Mode=644 owner=0.0 Type=48(-) ti->LinkName=`' namenode=`/usr/lib/xorg/modules/libwfb.so' flags=2 instead=`/usr/lib/nvidia/libwfb.so.xserver-xorg-core' D000010: namenodetouse namenode=`/usr/lib/xorg/modules/libwfb.so' pkg=xserver-xorg-core D000010: namenodetouse ... useinstead=/usr/lib/nvidia/libwfb.so.xserver-xorg-core camefrom=<none> pkg=nvidia-glx-new return /usr/lib/nvidia/libwfb.so.xserver-xorg-core D000100: setupvnamevbs main=`/usr/lib/nvidia/libwfb.so.xserver-xorg-core' tmp=`/usr/lib/nvidia/libwfb.so.xserver-xorg-core.dpkg-tmp' new=`/usr/lib/nvidia/libwfb.so.xserver-xorg-core.dpkg-new' D000100: tarobject nonexistent D000010: ensure_pathname_nonexisting `/usr/lib/nvidia/libwfb.so.xserver-xorg-core.dpkg-new' D000010: ensure_pathname_nonexisting `/usr/lib/nvidia/libwfb.so.xserver-xorg-core.dpkg-tmp' dpkg: error processing /var/cache/apt/archives/xserver-xorg-core_2%3a1.4.1~git20071212-1ubuntu2_i386.deb (--install): unable to create `./usr/lib/xorg/modules/libwfb.so': No such file or directory With the attached patch the error will look like the following instead: dpkg: error processing /var/cache/apt/archives/xserver-xorg-core_2%3a1.4.1~git20071212-1ubuntu2_i386.deb (--install): unable to create `/usr/lib/nvidia/libwfb.so.xserver-xorg-core.dpkg-new' (while processing `./usr/lib/xorg/modules/libwfb.so'): No such file or directory I think using this format makes sense also for normal (non-diverted files), because it points out the exact file where the error occurred. -- http://daniel.hahler.de/
diff -ru dpkg-1.14.12ubuntu3.orig/src/archives.c dpkg-1.14.12ubuntu3/src/archives.c --- dpkg-1.14.12ubuntu3.orig/src/archives.c 2007-12-05 10:42:16.000000000 +0100 +++ dpkg-1.14.12ubuntu3/src/archives.c 2007-12-20 03:16:29.169061806 +0100 @@ -648,7 +648,7 @@ * it until we apply the proper mode, which might be a statoverride. */ fd= open(fnamenewvb.buf, (O_CREAT|O_EXCL|O_WRONLY), 0); - if (fd < 0) ohshite(_("unable to create `%.255s'"),ti->Name); + if (fd < 0) ohshite(_("unable to create `%.255s' (while processing `%.255s')"),fnamenewvb.buf,ti->Name); push_cleanup(cu_closefd,ehflag_bombout, 0,0, 1,(void*)&fd); debug(dbg_eachfiledetail,"tarobject NormalFile[01] open size=%lu", (unsigned long)ti->Size);
signature.asc
Description: This is a digitally signed message part.