When SIGTERM sent or any exception is caught, update_caches was run before
exiting because of the finally block... But... the cache validity code looks if cached_dir stat.mtime is less than cachefile.mtime... In this case cache file is updated but it may be updated without any real update done on it after extracting package files... So it was still keeping the old package info in memory and it was written without being updated: EXTRACT_FILES -> SIGTERM -> UPDATE_CACHE but it has to be EXTRACT_FILES -> UPDATE_DB (in memory) -> UPDATE_CACHE this may also be done with really checking if any update is done in that db file before saving cache... but this is easier BUG:FIXED:10469
This commit is contained in:
+3
-2
@@ -67,9 +67,10 @@ def locked(func):
|
||||
|
||||
try:
|
||||
pisi.db.invalidate_caches()
|
||||
return func(*__args,**__kw)
|
||||
finally:
|
||||
ret = func(*__args,**__kw)
|
||||
pisi.db.update_caches()
|
||||
return ret
|
||||
finally:
|
||||
lock.close()
|
||||
return wrapper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user