mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
cleanup database when a package is removed
This commit is contained in:
parent
1931a86c82
commit
1422f577d7
1 changed files with 3 additions and 1 deletions
|
@ -262,7 +262,9 @@ class EventHandler(pyinotify.ProcessEvent):
|
|||
else:
|
||||
res = self._db.execute('select state from pkginfo where filename = ? and state = 1 limit 1', (act.path,))
|
||||
if tuple(res) == ():
|
||||
# the file isn't in repo database, ignoring
|
||||
# the file isn't in repo database, just delete from our info database
|
||||
logging.debug('deleting entry for not-in-database package: %s', act.path)
|
||||
self._db.execute('delete from pkginfo where filename = ?', (act.path,))
|
||||
return
|
||||
def callback():
|
||||
self._db.execute('delete from pkginfo where filename = ?', (act.path,))
|
||||
|
|
Loading…
Add table
Reference in a new issue