be_files: write EPOCH instead of FORCE

This patch is only meant for 3.4.x. It prepares the place for the future
epoch-aware release.

All force packages that get reinstalled or upgraded will get an EPOCH
entry in the local database, and thus the new pacman with epoch won't
reinstall them by mistake on the first -Su.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2010-10-14 21:50:19 +02:00 committed by Dan McGee
parent eedf4f4e63
commit 5c8083baa4
1 changed files with 4 additions and 3 deletions

View File

@ -810,10 +810,11 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
}
fprintf(fp, "\n");
}
if(info->force) {
fprintf(fp, "%%FORCE%%\n\n");
}
if(local) {
if(info->force) {
fprintf(fp, "%%EPOCH%%\n"
"1\n\n");
}
if(info->url) {
fprintf(fp, "%%URL%%\n"
"%s\n\n", info->url);