summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-02 22:29:48 +0000
committerAaron Griffin <aaron@archlinux.org>2007-01-02 22:29:48 +0000
commit61d03cc3458c4210ae99d9bf67480d675c6b783a (patch)
treea7dbc3d6cd20af6488606b2bea03a036e86c121b
parent776a45ce7cd1ce8ddeebf4ec66fbdaa610af55a0 (diff)
* Missing error label in sync.c
* Additional debug output for db_write
-rw-r--r--lib/libalpm/be_files.c5
-rw-r--r--lib/libalpm/sync.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 24adabb4..62d08dd3 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -468,9 +468,10 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq)
if(strcmp(db->treename, "local") == 0) {
local = 1;
}
-
+
/* DESC */
if(inforeq & INFRQ_DESC) {
+ _alpm_log(PM_LOG_DEBUG, _("writing %s-%s DESC information back to db"), info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/desc", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
_alpm_log(PM_LOG_ERROR, _("db_write: could not open file %s/desc"), db->treename);
@@ -556,6 +557,7 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq)
/* FILES */
if(local && (inforeq & INFRQ_FILES)) {
+ _alpm_log(PM_LOG_DEBUG, _("writing %s-%s FILES information back to db"), info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/files", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
_alpm_log(PM_LOG_ERROR, _("db_write: could not open file %s/files"), db->treename);
@@ -582,6 +584,7 @@ int _alpm_db_write(pmdb_t *db, pmpkg_t *info, unsigned int inforeq)
/* DEPENDS */
if(inforeq & INFRQ_DEPENDS) {
+ _alpm_log(PM_LOG_DEBUG, _("writing %s-%s DEPENDS information back to db"), info->name, info->version);
snprintf(path, PATH_MAX, "%s/%s-%s/depends", db->path, info->name, info->version);
if((fp = fopen(path, "w")) == NULL) {
_alpm_log(PM_LOG_ERROR, _("db_write: could not open file %s/depends"), db->treename);
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 65e27d9a..956ebf47 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -265,6 +265,7 @@ int _alpm_sync_sysupgrade(pmtrans_t *trans, pmdb_t *db_local, pmlist_t *dbs_sync
return(0);
}
+error:
/* if we're here, it's an error */
return(-1);
}