Package: aptitude
Version: 0.6.11-1
Severity: normal
Usertags: warnings race-condition

I run several cron jobs each doing aptitude searches and I often get
this warning from aptitude:

E: Unable to replace /home/pabs/.aptitude/config with new configuration file - 
apt_init (2: No such file or directory)

Looking at the code it seems that there is a race condition when
multiple aptitude instances are running:

http://sources.debian.net/src/aptitude/0.6.11-1/src/generic/apt/apt.cc?hl=247#L247

Every instance is using ~/.aptitude/config.new instead of creating a
temporary unique filename. This means that one process can rename
the .new file before another process gets a chance to do that, which
means the .new file disappears, rename fails and a warning is given.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to