1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

Attempt #2 at -S/-Su unification: verify that the 'force' option has been read before comparing versions

This commit is contained in:
Aaron Griffin 2007-02-06 20:57:17 +00:00
parent ac6e1c696e
commit 79c277a218
2 changed files with 6 additions and 1 deletions

View File

@ -125,6 +125,11 @@ void _alpm_pkg_free(void *data)
/* Is pkgB an upgrade for pkgA ? */ /* Is pkgB an upgrade for pkgA ? */
int alpm_pkg_compare_versions(pmpkg_t *pkgA, pmpkg_t *pkgB) 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) { if(pkgB->force) {
/* skip the version compare call if this is a 'force' package */ /* skip the version compare call if this is a 'force' package */
return(1); return(1);

View File

@ -82,7 +82,7 @@ struct __pmpkg_t {
alpm_list_t *conflicts; alpm_list_t *conflicts;
alpm_list_t *provides; alpm_list_t *provides;
/* internal */ /* internal */
unsigned short origin; pmpkgfrom_t origin;
void *data; void *data;
pmdbinfrq_t infolevel; pmdbinfrq_t infolevel;
}; };