From 2b10123399916d6ee93cfd147f45f0bec121fec2 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 4 Mar 2009 09:27:59 +0000 Subject: db: unlink apk-new if it is identical to existing config --- src/database.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/database.c b/src/database.c index a1437ba..27b49ea 100644 --- a/src/database.c +++ b/src/database.c @@ -1083,6 +1083,9 @@ static int apk_db_install_archive_entry(void *_ctx, diri->dir->dirname, file->filename); r = apk_archive_entry_extract(ae, is, alt_name, extract_cb, ctx); + /* remove identical apk-new */ + if (memcmp(ae->csum, fi.csum, sizeof(csum_t)) == 0) + unlink(alt_name); } } else { r = apk_archive_entry_extract(ae, is, NULL, -- cgit v1.2.3-70-g09d2