aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-04 09:27:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-04 09:27:59 +0000
commit2b10123399916d6ee93cfd147f45f0bec121fec2 (patch)
tree65ad66d4eee69b7cadf923925db27f86054ae9d5 /src/database.c
parent3752b47e7b3b57affdc11f29a90ba2582812d314 (diff)
downloadaports-2b10123399916d6ee93cfd147f45f0bec121fec2.tar.gz
aports-2b10123399916d6ee93cfd147f45f0bec121fec2.tar.bz2
aports-2b10123399916d6ee93cfd147f45f0bec121fec2.tar.xz
db: unlink apk-new if it is identical to existing config
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index a1437ba188..27b49ea2cc 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,