mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-02 00:25:07 -04:00
Incorrect usage of alpm_db_whatprovides in sync.c
The old code thought that alpm_db_whatprovides returns with a list of strings (package names). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
434ea5bf61
commit
b6b3b0135e
@ -279,9 +279,9 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
|||||||
if(!p) {
|
if(!p) {
|
||||||
RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
|
RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
|
||||||
}
|
}
|
||||||
|
spkg = (pmpkg_t *) p->data;
|
||||||
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s'\n",
|
||||||
(char *)p->data, targ);
|
alpm_pkg_get_name(spkg), targ);
|
||||||
spkg = _alpm_db_get_pkgfromcache(db, p->data);
|
|
||||||
alpm_list_free(p);
|
alpm_list_free(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,9 +303,9 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
|||||||
pmdb_t *db = j->data;
|
pmdb_t *db = j->data;
|
||||||
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
|
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
|
||||||
if(p) {
|
if(p) {
|
||||||
|
spkg = (pmpkg_t *) p->data;
|
||||||
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s' in db '%s'\n",
|
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s' in db '%s'\n",
|
||||||
(char *)p->data, targ, db->treename);
|
alpm_pkg_get_name(spkg), targ, db->treename);
|
||||||
spkg = _alpm_db_get_pkgfromcache(db, p->data);
|
|
||||||
alpm_list_free(p);
|
alpm_list_free(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user