db: honour clean-protected flag again

cute-signatures
Timo Teras 2009-07-22 16:00:14 +03:00
parent 93f0b3524c
commit 23582a0ec5
1 changed files with 2 additions and 1 deletions

View File

@ -1493,7 +1493,8 @@ static void apk_db_migrate_files(struct apk_database *db,
if (ofile == NULL || if (ofile == NULL ||
ofile->csum.type != file->csum.type) ofile->csum.type != file->csum.type)
apk_file_get_info(name, file->csum.type, &fi); apk_file_get_info(name, file->csum.type, &fi);
if (apk_checksum_compare(&file->csum, &fi.csum) == 0) if ((apk_flags & APK_CLEAN_PROTECTED) ||
apk_checksum_compare(&file->csum, &fi.csum) == 0)
unlink(tmpname); unlink(tmpname);
} else { } else {
/* Overwrite the old file */ /* Overwrite the old file */