mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
Add some more debugging output to dep checking code
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
671224b64c
commit
fe3a461703
@ -270,6 +270,8 @@ alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
|
||||
_alpm_log(PM_LOG_DEBUG, "null package found in package list\n");
|
||||
continue;
|
||||
}
|
||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: package %s-%s\n",
|
||||
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
|
||||
|
||||
if((oldpkg = _alpm_db_get_pkgfromcache(db, alpm_pkg_get_name(newpkg))) == NULL) {
|
||||
_alpm_log(PM_LOG_DEBUG, "cannot find package installed '%s'\n",
|
||||
@ -354,6 +356,8 @@ alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
|
||||
_alpm_log(PM_LOG_DEBUG, "null package found in package list\n");
|
||||
continue;
|
||||
}
|
||||
_alpm_log(PM_LOG_DEBUG, "checkdeps: package %s-%s\n",
|
||||
alpm_pkg_get_name(tp), alpm_pkg_get_version(tp));
|
||||
|
||||
for(j = alpm_pkg_get_depends(tp); j; j = j->next) {
|
||||
/* split into name/version pairs */
|
||||
@ -454,7 +458,7 @@ alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
|
||||
return(baddeps);
|
||||
}
|
||||
|
||||
static int _alpm_dep_vercmp(const char *version1, pmdepmod_t mod,
|
||||
static int dep_vercmp(const char *version1, pmdepmod_t mod,
|
||||
const char *version2)
|
||||
{
|
||||
int equal = 0;
|
||||
@ -485,7 +489,7 @@ int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
|
||||
if(strcmp(pkgname, dep->name) == 0
|
||||
|| alpm_list_find_str(alpm_pkg_get_provides(pkg), dep->name)) {
|
||||
|
||||
equal = _alpm_dep_vercmp(pkgversion, dep->mod, dep->version);
|
||||
equal = dep_vercmp(pkgversion, dep->mod, dep->version);
|
||||
|
||||
char *mod = "~=";
|
||||
switch(dep->mod) {
|
||||
|
@ -267,9 +267,10 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
||||
strncpy(targline, name, PKG_FULLNAME_LEN);
|
||||
targ = strchr(targline, '/');
|
||||
if(targ) {
|
||||
/* we are looking for a package in a specific database */
|
||||
*targ = '\0';
|
||||
targ++;
|
||||
_alpm_log(PM_LOG_DEBUG, "searching for target in repo '%s'\n", targ);
|
||||
_alpm_log(PM_LOG_DEBUG, "searching for target '%s' in repo\n", targ);
|
||||
for(j = dbs_sync; j && !spkg; j = j->next) {
|
||||
pmdb_t *db = j->data;
|
||||
if(strcmp(db->treename, targline) == 0) {
|
||||
@ -277,7 +278,7 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
||||
spkg = _alpm_db_get_pkgfromcache(db, targ);
|
||||
if(spkg == NULL) {
|
||||
/* Search provides */
|
||||
_alpm_log(PM_LOG_DEBUG, "target '%s' not found -- looking for provisions\n", targ);
|
||||
_alpm_log(PM_LOG_DEBUG, "target '%s' not found in db '%s' -- looking for provisions\n", targ, db->treename);
|
||||
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
|
||||
if(!p) {
|
||||
RET_ERR(PM_ERR_PKG_NOT_FOUND, -1);
|
||||
@ -306,8 +307,8 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
|
||||
pmdb_t *db = j->data;
|
||||
alpm_list_t *p = _alpm_db_whatprovides(db, targ);
|
||||
if(p) {
|
||||
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s'\n",
|
||||
(char *)p->data, targ);
|
||||
_alpm_log(PM_LOG_DEBUG, "found '%s' as a provision for '%s' in db '%s'\n",
|
||||
(char *)p->data, targ, db->treename);
|
||||
spkg = _alpm_db_get_pkgfromcache(db, p->data);
|
||||
alpm_list_free(p);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user