index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2019-01-10 13:44:32 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-01-10 14:14:04 +1000 |
commit | e9d91a688d1a2ebe58e8a895853debf745a529cf (patch) | |
tree | 8b0cf8ee5159de8ce596df62140dfda941bd6e61 | |
parent | 9b2a90cfb1910b5092ffec3375177229101323e4 (diff) |
-rw-r--r-- | lib/libalpm/alpm.h | 2 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 6 | ||||
-rw-r--r-- | src/pacman/query.c | 4 |
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 597e11bd..bbce0971 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1452,7 +1452,7 @@ alpm_list_t *alpm_find_group_pkgs(alpm_list_t *dbs, const char *name); * Sync */ -alpm_pkg_t *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_sync); +alpm_pkg_t *alpm_sync_get_new_version(alpm_pkg_t *pkg, alpm_list_t *dbs_sync); /** @addtogroup alpm_api_trans Transaction Functions * Functions to manipulate libalpm transactions diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 05f58fad..de579eac 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -51,7 +51,7 @@ /** Check for new version of pkg in sync repos * (only the first occurrence is considered in sync) */ -alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_sync) +alpm_pkg_t SYMEXPORT *alpm_sync_get_new_version(alpm_pkg_t *pkg, alpm_list_t *dbs_sync) { alpm_list_t *i; alpm_pkg_t *spkg = NULL; @@ -61,10 +61,6 @@ alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_syn for(i = dbs_sync; !spkg && i; i = i->next) { alpm_db_t *db = i->data; - if(!(db->usage & ALPM_DB_USAGE_SEARCH)) { - continue; - } - spkg = _alpm_db_get_pkgfromcache(db, pkg->name); } diff --git a/src/pacman/query.c b/src/pacman/query.c index 00c39638..9ac6e930 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -286,7 +286,7 @@ static int filter(alpm_pkg_t *pkg) return 0; } /* check if this pkg is outdated */ - if(config->op_q_upgrade && (alpm_sync_newversion(pkg, + if(config->op_q_upgrade && (alpm_sync_get_new_version(pkg, alpm_get_syncdbs(config->handle)) == NULL)) { return 0; } @@ -325,7 +325,7 @@ static int display(alpm_pkg_t *pkg) colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor); if(config->op_q_upgrade) { - alpm_pkg_t *newpkg = alpm_sync_newversion(pkg, alpm_get_syncdbs(config->handle)); + alpm_pkg_t *newpkg = alpm_sync_get_new_version(pkg, alpm_get_syncdbs(config->handle)); printf(" -> %s%s%s", colstr->version, alpm_pkg_get_version(newpkg), colstr->nocolor); if(alpm_pkg_should_ignore(config->handle, pkg)) { |