summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-07-02 02:12:36 +0200
committerDan McGee <dan@archlinux.org>2007-07-02 04:31:40 +0200
commitf55f7f100f650ff040f8721cf761a060af1c05fe (patch)
treeacfd01ac99594f8fa49e59782bce0c5e8598701a /lib/libalpm/add.c
parentcd3a63681338b7510846837dcc169d276cf75458 (diff)
downloadpacman-f55f7f100f650ff040f8721cf761a060af1c05fe.tar.gz
pacman-f55f7f100f650ff040f8721cf761a060af1c05fe.tar.xz
libalpm/add.c,util.c : log ARCHIVE_WARN warning to debug output.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 1ebf455a..c9bcea5e 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -545,7 +545,11 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
archive_entry_set_pathname(entry, tempfile);
int ret = archive_read_extract(archive, entry, archive_flags);
- if(ret != ARCHIVE_OK && ret != ARCHIVE_WARN) {
+ if(ret == ARCHIVE_WARN) {
+ /* operation succeeded but a non-critical error was encountered */
+ _alpm_log(PM_LOG_DEBUG, _("warning extracting %s (%s)"),
+ entryname, archive_error_string(archive));
+ } else if(ret != ARCHIVE_OK) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
entryname, archive_error_string(archive));
alpm_logaction(_("could not extract %s (%s)"),
@@ -701,7 +705,11 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
archive_entry_set_pathname(entry, filename);
int ret = archive_read_extract(archive, entry, archive_flags);
- if(ret != ARCHIVE_OK && ret != ARCHIVE_WARN) {
+ if(ret == ARCHIVE_WARN) {
+ /* operation succeeded but a non-critical error was encountered */
+ _alpm_log(PM_LOG_DEBUG, _("warning extracting %s (%s)"),
+ entryname, archive_error_string(archive));
+ } else if(ret != ARCHIVE_OK) {
_alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"),
entryname, archive_error_string(archive));
alpm_logaction(_("could not extract %s (%s)"),