summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-05-02 17:25:45 -0500
committerDan McGee <dan@archlinux.org>2011-05-05 12:08:59 -0500
commit3045f09ef49d775fec5e772f5f8b894e31388fbf (patch)
treeca2c076dd353e61e1f0e7b8a73261896ed22fb00 /lib/libalpm
parent73c74355abf0f6759a2f9a9219ea571444b6495a (diff)
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>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/be_local.c5
-rw-r--r--lib/libalpm/be_sync.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index d4f7b38e..bdfdb4fd 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -434,7 +434,7 @@ static int local_db_populate(pmdb_t *db)
}
/* 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);
db->pkgcache = _alpm_pkghash_add(db->pkgcache, pkg);
count++;
@@ -444,6 +444,9 @@ static int local_db_populate(pmdb_t *db)
if(count > 0) {
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;
}
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index a5633611..c38e232c 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -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);
}
archive_read_finish(archive);
+ _alpm_log(PM_LOG_DEBUG, "added %d packages to package cache for db '%s'\n",
+ count, db->treename);
return count;
}