Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-28 08:21:17 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-28 08:21:17 +0000
commit56917dc30493680219e0eceddbf178242522f11d (patch)
tree4dd1c8eeff9122a6de3473c2395ac6c5ea13f225 /lib/libalpm/package.c
parent9c17eb88f09bfbead0c7b9c63dd47aa6fcfdfda6 (diff)
improved logs (use _alpm_log instead of fprintf)
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 4e56b763..418fefb1 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -33,6 +33,7 @@
#include "error.h"
#include "list.h"
#include "package.h"
+#include "alpm.h"
pmpkg_t *pkg_new()
{
@@ -118,12 +119,12 @@ static int parse_descfile(char *descfile, pmpkg_t *info, int output)
continue;
}
if(output) {
- printf("%s\n", line);
+ _alpm_log(PM_LOG_DEBUG, "%s", line);
}
ptr = line;
key = strsep(&ptr, "=");
if(key == NULL || ptr == NULL) {
- fprintf(stderr, "%s: syntax error in description file line %d\n",
+ _alpm_log(PM_LOG_ERROR, "%s: syntax error in description file line %d",
info->name[0] != '\0' ? info->name : "error", linenum);
} else {
_alpm_strtrim(key);
@@ -164,7 +165,7 @@ static int parse_descfile(char *descfile, pmpkg_t *info, int output)
} else if(!strcmp(key, "BACKUP")) {
info->backup = pm_list_add(info->backup, strdup(ptr));
} else {
- fprintf(stderr, "%s: syntax error in description file line %d\n",
+ _alpm_log(PM_LOG_ERROR, "%s: syntax error in description file line %d",
info->name[0] != '\0' ? info->name : "error", linenum);
}
}
@@ -257,7 +258,7 @@ pmpkg_t *pkg_load(char *pkgfile)
FREE(str);
fclose(fp);
if(unlink(fn)) {
- _alpm_log(PM_LOG_WARNING, "could not remove tempfile %s\n", fn);
+ _alpm_log(PM_LOG_WARNING, "could not remove tempfile %s", fn);
}
FREE(fn);
filelist = 1;