From d796d1cdda15889fc0793eae50582d75f07d55d5 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Jul 2011 02:01:38 +1000 Subject: Prefix alpm_fileconflicttype_t members with ALPM Signed-off-by: Allan McRae --- lib/libalpm/conflict.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 5d9bbf23..615cd0c1 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -276,7 +276,7 @@ static alpm_list_t *filelist_operation(alpm_list_t *filesA, alpm_list_t *filesB, } /* Adds alpm_fileconflict_t to a conflicts list. Pass the conflicts list, type - * (either PM_FILECONFLICT_TARGET or PM_FILECONFLICT_FILESYSTEM), a file + * (either ALPM_FILECONFLICT_TARGET or ALPM_FILECONFLICT_FILESYSTEM), a file * string, and either two package names or one package name and NULL. This is * a wrapper for former functionality that was done inline. */ @@ -407,7 +407,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, for(k = common_files; k; k = k->next) { snprintf(path, PATH_MAX, "%s%s", handle->root, (char *)k->data); conflicts = add_fileconflict(handle, conflicts, - PM_FILECONFLICT_TARGET, path, + ALPM_FILECONFLICT_TARGET, path, alpm_pkg_get_name(p1), alpm_pkg_get_name(p2)); if(handle->pm_errno == PM_ERR_MEMORY) { FREELIST(conflicts); @@ -534,7 +534,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, if(!resolved_conflict) { conflicts = add_fileconflict(handle, conflicts, - PM_FILECONFLICT_FILESYSTEM, path, p1->name, NULL); + ALPM_FILECONFLICT_FILESYSTEM, path, p1->name, NULL); if(handle->pm_errno == PM_ERR_MEMORY) { FREELIST(conflicts); if(dbpkg) { -- cgit v1.2.3-24-g4f1b From ca43fdd92f06a6997c53e45bfed6fb27f3044de5 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Jul 2011 02:01:38 +1000 Subject: Prefix alpm_loglevel_t members with ALPM Signed-off-by: Allan McRae --- lib/libalpm/conflict.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 615cd0c1..7324e34e 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -107,7 +107,7 @@ static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps, if(!conflict) { return -1; } - _alpm_log(handle, PM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n", + _alpm_log(handle, ALPM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n", pkg1, pkg2, reason); if(!conflict_isin(conflict, *baddeps)) { *baddeps = alpm_list_add(*baddeps, conflict); @@ -174,7 +174,7 @@ alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages) { alpm_list_t *baddeps = NULL; - _alpm_log(handle, PM_LOG_DEBUG, "check targets vs targets\n"); + _alpm_log(handle, ALPM_LOG_DEBUG, "check targets vs targets\n"); check_conflict(handle, packages, packages, &baddeps, 0); return baddeps; @@ -196,9 +196,9 @@ alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages) packages, _alpm_pkg_cmp); /* two checks to be done here for conflicts */ - _alpm_log(db->handle, PM_LOG_DEBUG, "check targets vs db\n"); + _alpm_log(db->handle, ALPM_LOG_DEBUG, "check targets vs db\n"); check_conflict(db->handle, packages, dblist, &baddeps, 1); - _alpm_log(db->handle, PM_LOG_DEBUG, "check db vs targets\n"); + _alpm_log(db->handle, ALPM_LOG_DEBUG, "check db vs targets\n"); check_conflict(db->handle, dblist, packages, &baddeps, -1); alpm_list_free(dblist); @@ -297,7 +297,7 @@ static alpm_list_t *add_fileconflict(alpm_handle_t *handle, } conflicts = alpm_list_add(conflicts, conflict); - _alpm_log(handle, PM_LOG_DEBUG, "found file conflict %s, packages %s and %s\n", + _alpm_log(handle, ALPM_LOG_DEBUG, "found file conflict %s, packages %s and %s\n", filestr, name1, name2 ? name2 : "(filesystem)"); return conflicts; @@ -392,7 +392,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", percent, numtargs, current); /* CHECK 1: check every target against every target */ - _alpm_log(handle, PM_LOG_DEBUG, "searching for file conflicts: %s\n", + _alpm_log(handle, ALPM_LOG_DEBUG, "searching for file conflicts: %s\n", alpm_pkg_get_name(p1)); for(j = i->next; j; j = j->next) { alpm_list_t *common_files; @@ -420,7 +420,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, } /* CHECK 2: check every target against the filesystem */ - _alpm_log(handle, PM_LOG_DEBUG, "searching for filesystem conflicts: %s\n", + _alpm_log(handle, ALPM_LOG_DEBUG, "searching for filesystem conflicts: %s\n", p1->name); dbpkg = _alpm_db_get_pkgfromcache(handle->db_local, p1->name); @@ -454,12 +454,12 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, if(path[strlen(path) - 1] == '/') { struct stat sbuf; if(S_ISDIR(lsbuf.st_mode)) { - _alpm_log(handle, PM_LOG_DEBUG, "%s is a directory, not a conflict\n", path); + _alpm_log(handle, ALPM_LOG_DEBUG, "%s is a directory, not a conflict\n", path); continue; } stat(path, &sbuf); if(S_ISLNK(lsbuf.st_mode) && S_ISDIR(sbuf.st_mode)) { - _alpm_log(handle, PM_LOG_DEBUG, + _alpm_log(handle, ALPM_LOG_DEBUG, "%s is a symlink to a dir, hopefully not a conflict\n", path); continue; } @@ -469,14 +469,14 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, path[strlen(path) - 1] = '\0'; } - _alpm_log(handle, PM_LOG_DEBUG, "checking possible conflict: %s\n", path); + _alpm_log(handle, ALPM_LOG_DEBUG, "checking possible conflict: %s\n", path); relative_path = path + strlen(handle->root); /* Check remove list (will we remove the conflicting local file?) */ for(k = remove; k && !resolved_conflict; k = k->next) { alpm_pkg_t *rempkg = k->data; if(alpm_list_find_str(alpm_pkg_get_files(rempkg), relative_path)) { - _alpm_log(handle, PM_LOG_DEBUG, + _alpm_log(handle, ALPM_LOG_DEBUG, "local file will be removed, not a conflict: %s\n", relative_path); resolved_conflict = 1; @@ -498,7 +498,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, * by its new owner (whether the file is in backup array or not */ handle->trans->skip_remove = alpm_list_add(handle->trans->skip_remove, strdup(filestr)); - _alpm_log(handle, PM_LOG_DEBUG, + _alpm_log(handle, ALPM_LOG_DEBUG, "file changed packages, adding to remove skiplist: %s\n", filestr); resolved_conflict = 1; @@ -510,7 +510,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, char *dir = malloc(strlen(filestr) + 2); sprintf(dir, "%s/", filestr); if(alpm_list_find_str(alpm_pkg_get_files(dbpkg),dir)) { - _alpm_log(handle, PM_LOG_DEBUG, + _alpm_log(handle, ALPM_LOG_DEBUG, "check if all files in %s belongs to %s\n", dir, dbpkg->name); resolved_conflict = dir_belongsto_pkg(handle->root, filestr, dbpkg); -- cgit v1.2.3-24-g4f1b From bd88a8d5511c24db55dd2a5c04161918571dbfbd Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Jul 2011 02:01:39 +1000 Subject: Prefix alpm_transprog_t members with ALPM Signed-off-by: Allan McRae --- lib/libalpm/conflict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 7324e34e..af1bce15 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -389,7 +389,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, } int percent = (current * 100) / numtargs; - PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", percent, + PROGRESS(trans, ALPM_TRANS_PROGRESS_CONFLICTS_START, "", percent, numtargs, current); /* CHECK 1: check every target against every target */ _alpm_log(handle, ALPM_LOG_DEBUG, "searching for file conflicts: %s\n", @@ -550,7 +550,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, FREELIST(tmpfiles); } } - PROGRESS(trans, PM_TRANS_PROGRESS_CONFLICTS_START, "", 100, + PROGRESS(trans, ALPM_TRANS_PROGRESS_CONFLICTS_START, "", 100, numtargs, current); return conflicts; -- cgit v1.2.3-24-g4f1b From afc96f2ab3d05f14a73e81f871164f01423b5572 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Jul 2011 02:01:39 +1000 Subject: Prefix _alpm_errno_t members with ALPM Signed-off-by: Allan McRae --- lib/libalpm/conflict.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/conflict.c') diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index af1bce15..ad689dcf 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -303,7 +303,7 @@ static alpm_list_t *add_fileconflict(alpm_handle_t *handle, return conflicts; error: - RET_ERR(handle, PM_ERR_MEMORY, conflicts); + RET_ERR(handle, ALPM_ERR_MEMORY, conflicts); } void _alpm_fileconflict_free(alpm_fileconflict_t *conflict) @@ -409,7 +409,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, conflicts = add_fileconflict(handle, conflicts, ALPM_FILECONFLICT_TARGET, path, alpm_pkg_get_name(p1), alpm_pkg_get_name(p2)); - if(handle->pm_errno == PM_ERR_MEMORY) { + if(handle->pm_errno == ALPM_ERR_MEMORY) { FREELIST(conflicts); FREELIST(common_files); return NULL; @@ -535,7 +535,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, if(!resolved_conflict) { conflicts = add_fileconflict(handle, conflicts, ALPM_FILECONFLICT_FILESYSTEM, path, p1->name, NULL); - if(handle->pm_errno == PM_ERR_MEMORY) { + if(handle->pm_errno == ALPM_ERR_MEMORY) { FREELIST(conflicts); if(dbpkg) { /* only freed if it was generated from filelist_operation() */ -- cgit v1.2.3-24-g4f1b