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:
parent
ac6e1c696e
commit
79c277a218
@ -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);
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user