summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 0d109e4d..4290e9fc 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -393,9 +393,12 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
}
}
- _alpm_log(PM_LOG_FLOW1, "updating database");
/* make an install date (in UTC) */
STRNCPY(info->installdate, asctime(gmtime(&t)), sizeof(info->installdate));
+ /* remove the extra line feed appended by asctime() */
+ info->installdate[strlen(info->installdate)-1] = 0;
+
+ _alpm_log(PM_LOG_FLOW1, "updating database");
_alpm_log(PM_LOG_FLOW2, "adding database entry %s", info->name);
if(db_write(db, info, INFRQ_ALL)) {
_alpm_log(PM_LOG_ERROR, "could not update database entry %s/%s-%s", db->treename, info->name, info->version);