mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -05:00
Add more debug logging to dir_belongsto_pkg() function
Now that we pass in the handle, we might as well add logging. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
5c1ba2d5fd
commit
7520c0facb
@ -341,6 +341,8 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath,
|
|||||||
|
|
||||||
/* check directory is actually in package - used for subdirectory checks */
|
/* check directory is actually in package - used for subdirectory checks */
|
||||||
if(!_alpm_filelist_contains(alpm_pkg_get_files(pkg), dirpath)) {
|
if(!_alpm_filelist_contains(alpm_pkg_get_files(pkg), dirpath)) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
|
"directory %s not in package %s\n", dirpath, pkg->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,6 +359,9 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(_alpm_filelist_contains(alpm_pkg_get_files(i->data), dirpath)) {
|
if(_alpm_filelist_contains(alpm_pkg_get_files(i->data), dirpath)) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
|
"file %s also in package %s\n", dirpath,
|
||||||
|
((alpm_pkg_t*)i->data)->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -391,6 +396,8 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath,
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
|
"unowned file %s found in directory\n", path);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,7 +561,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
|
|||||||
sprintf(dir, "%s/", filestr);
|
sprintf(dir, "%s/", filestr);
|
||||||
if(_alpm_filelist_contains(alpm_pkg_get_files(dbpkg), dir)) {
|
if(_alpm_filelist_contains(alpm_pkg_get_files(dbpkg), dir)) {
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG,
|
_alpm_log(handle, ALPM_LOG_DEBUG,
|
||||||
"check if all files in %s belong to %s\n",
|
"checking if all files in %s belong to %s\n",
|
||||||
dir, dbpkg->name);
|
dir, dbpkg->name);
|
||||||
resolved_conflict = dir_belongsto_pkg(handle, dir, dbpkg);
|
resolved_conflict = dir_belongsto_pkg(handle, dir, dbpkg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user