--- - branch: MAIN date: Fri Aug 5 07:04:28 UTC 2011 files: - new: '1.100' old: '1.99' path: pkgsrc/pkgtools/pkg_install/files/add/perform.c pathrev: pkgsrc/pkgtools/pkg_install/files/add/perform.c@1.100 type: modified - new: '1.162' old: '1.161' path: pkgsrc/pkgtools/pkg_install/files/lib/version.h pathrev: pkgsrc/pkgtools/pkg_install/files/lib/version.h@1.162 type: modified id: 20110805T070428Z.72fa889323f525aff505e8e5ad29e38fdd827cd5 log: "Fix for pkg_delete on NFS from Anthony Mallet.\n\nProblem analysis from Anthony:\n\n\tOn Wednesday, at 23:52, Anthony Mallet wrote:\n\t> # rm -rf ~tmp && mkdir ~/tmp\n\t> # pkg_add -K ~/tmp/var/db/pkg -p ~/tmp /usr/pkgsrc/packages/All/digest-20080510.tgz\n\t> # pkg_add -U -K ~/tmp/var/db/pkg -p ~/tmp /usr/pkgsrc/packages/All/digest-20080510.tgz\n\t> pkg_delete: Couldn't remove package directory in `/home/tho/tmp/var/db/pkg/digest-20080510'\n\t> Also, the dir var/db/pkg/digest-20080510.xxxxxxx is never cleaned.\n\t>\n\t> The problem apparently is that pkg_delete finds some stalled NFS entries\n\t> (.nfs*) in the var/db/pkg/digest-20080510 dir, so it does not delete the\n\t> directory. Is this due to pkg_add not correctly closing file descriptors before\n\t> exec'ing pkg_delete? For instance, I really don't understand the logic in\n\t> check_already_installed() (add/perform.c:375) regarding the open() of +CONTENTS\n\t> which is almost never closed (and never used as well...). Shouldn't this be\n\t> closed before running pkg_delete?\n\n\tktrace shows that the +CONTENTS file is open() by pkg_add, I believe this is in\n\tcheck_already_installed(), add/perform.c:381. Then pkg_delete is run and when\n\tit comes to deleting the pkgdir entry, it finds that .nfs file and aborts.\n\nBump version to 20110805\n" module: pkgsrc subject: 'CVS commit: pkgsrc/pkgtools/pkg_install/files' unixtime: '1312527868' user: agc