From 7237903c66af3997ac754df70cc8d25cefc8d1ae Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Thu, 14 Oct 2010 19:54:13 +0200 Subject: be_package: read force entry and convert to epoch We still need to read force entry in epoch-aware pacman, so that when we install an old force package, EPOCH gets written to the local db. Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- lib/libalpm/be_package.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index ddcad596..254f830b 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -184,6 +184,11 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg) STRDUP(newpkg->version, ptr, RET_ERR(PM_ERR_MEMORY, -1)); } else if(strcmp(key, "pkgdesc") == 0) { STRDUP(newpkg->desc, ptr, RET_ERR(PM_ERR_MEMORY, -1)); + } else if(strcmp(key, "force") == 0) { + /* For backward compatibility, like in sync_db_read */ + if(!newpkg->epoch) { + newpkg->epoch = 1; + } } else if(strcmp(key, "epoch") == 0) { newpkg->epoch = atoi(ptr); } else if(strcmp(key, "group") == 0) { -- cgit v1.2.3-70-g09d2