From 79c277a218308d3f11c0852b6feb967923e15587 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 6 Feb 2007 20:57:17 +0000 Subject: Attempt #2 at -S/-Su unification: verify that the 'force' option has been read before comparing versions --- lib/libalpm/package.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 9bc34016..1afaf38c 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -125,6 +125,11 @@ void _alpm_pkg_free(void *data) /* Is pkgB an upgrade for pkgA ? */ int alpm_pkg_compare_versions(pmpkg_t *pkgA, pmpkg_t *pkgB) { + if(spkg->origin == PKG_FROM_CACHE) { + /* ensure we have the /desc file, which contains the 'force' option */ + _alpm_db_read(pkgB->data, INFRQ_DESC, pkgB); + } + if(pkgB->force) { /* skip the version compare call if this is a 'force' package */ return(1); -- cgit v1.2.3-24-g4f1b