Commit 2b101233 authored by Natanael Copa's avatar Natanael Copa

db: unlink apk-new if it is identical to existing config

parent 3752b47e
...@@ -1083,6 +1083,9 @@ static int apk_db_install_archive_entry(void *_ctx, ...@@ -1083,6 +1083,9 @@ static int apk_db_install_archive_entry(void *_ctx,
diri->dir->dirname, file->filename); diri->dir->dirname, file->filename);
r = apk_archive_entry_extract(ae, is, alt_name, r = apk_archive_entry_extract(ae, is, alt_name,
extract_cb, ctx); extract_cb, ctx);
/* remove identical apk-new */
if (memcmp(ae->csum, fi.csum, sizeof(csum_t)) == 0)
unlink(alt_name);
} }
} else { } else {
r = apk_archive_entry_extract(ae, is, NULL, r = apk_archive_entry_extract(ae, is, NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment