On Wed, Apr 15, 2015 at 03:54:36PM +0200, Julian Andres Klode wrote: > Am 15.04.2015 15:48 schrieb "Tim Landscheidt" <t...@tim-landscheidt.de>: > > That may unnecessarily narrow down potential fixes for this > > bug. Of course it would be possible as well (and maybe > > preferable) for "apt-get update" (and other commands?) to > > create their temporary files elsewhere or, depending on com- > > patibility and privilege considerations, use linkat(2) with > > AT_EMPTY_PATH.
"This flag is Linux-specific". If we fix that we shouldn't leave our hurd and kfreebsd friends out in the cold if possible… (Its friend open(2) O_TMPFILE is even linux and filesystem-specific) > Locking seems like the best idea IMO, not sure how things currently work > for cache though. The cachefiles are created by pkgCacheGenerator::MakeStatusCache in apt-pkg/pkgcachegen.cc. Adding some write-locking here and trying to get one in pkgCacheFile::RemoveCaches in apt-pkg/cachefile.cc and if not skipping the file should be possible and enough to fix that, right? So, Tim, you seem to be interested in seeing this fixed in the future, may I interest you in writing a patch? Feel free to ask me (or the others) by mail or IRC (#debian-apt) anything (optionally even stuff related to apt). ;) Best regards David Kalnischkies
signature.asc
Description: Digital signature