1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-12 04:15:06 -05:00

Logging changes during DB load

The switch from FUNCTION to DEBUG was ill-advised inside the local
database load. Instead, add a DEBUG level logger to both local and sync
database loads that shows the number of packages processed.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-05-02 17:25:45 -05:00
parent 73c74355ab
commit 3045f09ef4
2 changed files with 6 additions and 1 deletions

View File

@ -434,7 +434,7 @@ static int local_db_populate(pmdb_t *db)
} }
/* add to the collection */ /* add to the collection */
_alpm_log(PM_LOG_DEBUG, "adding '%s' to package cache for db '%s'\n", _alpm_log(PM_LOG_FUNCTION, "adding '%s' to package cache for db '%s'\n",
pkg->name, db->treename); pkg->name, db->treename);
db->pkgcache = _alpm_pkghash_add(db->pkgcache, pkg); db->pkgcache = _alpm_pkghash_add(db->pkgcache, pkg);
count++; count++;
@ -444,6 +444,9 @@ static int local_db_populate(pmdb_t *db)
if(count > 0) { if(count > 0) {
db->pkgcache->list = alpm_list_msort(db->pkgcache->list, (size_t)count, _alpm_pkg_cmp); db->pkgcache->list = alpm_list_msort(db->pkgcache->list, (size_t)count, _alpm_pkg_cmp);
} }
_alpm_log(PM_LOG_DEBUG, "added %d packages to package cache for db '%s'\n",
count, db->treename);
return count; return count;
} }

View File

@ -327,6 +327,8 @@ static int sync_db_populate(pmdb_t *db)
db->pkgcache->list = alpm_list_msort(db->pkgcache->list, (size_t)count, _alpm_pkg_cmp); db->pkgcache->list = alpm_list_msort(db->pkgcache->list, (size_t)count, _alpm_pkg_cmp);
} }
archive_read_finish(archive); archive_read_finish(archive);
_alpm_log(PM_LOG_DEBUG, "added %d packages to package cache for db '%s'\n",
count, db->treename);
return count; return count;
} }