aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/apk-tools/0001-print-print-warnings-and-errors-to-stderr.patch74
-rw-r--r--main/apk-tools/APKBUILD3
2 files changed, 76 insertions, 1 deletions
diff --git a/main/apk-tools/0001-print-print-warnings-and-errors-to-stderr.patch b/main/apk-tools/0001-print-print-warnings-and-errors-to-stderr.patch
new file mode 100644
index 0000000000..10fa015948
--- /dev/null
+++ b/main/apk-tools/0001-print-print-warnings-and-errors-to-stderr.patch
@@ -0,0 +1,74 @@
+From a0b5e33ad2cd3e106cf52b1c7100617ed5a784a7 Mon Sep 17 00:00:00 2001
+From: Shiz <hi@shiz.me>
+Date: Mon, 10 Apr 2017 08:47:22 +0200
+Subject: [PATCH] print: print warnings and errors to stderr
+
+---
+ src/apk_print.h | 5 +++--
+ src/print.c | 25 ++++++++++++++++++-------
+ 2 files changed, 21 insertions(+), 9 deletions(-)
+
+diff --git a/src/apk_print.h b/src/apk_print.h
+index 590b8f3..841107d 100644
+--- a/src/apk_print.h
++++ b/src/apk_print.h
+@@ -14,13 +14,14 @@
+
+ #include "apk_blob.h"
+
+-#define apk_error(args...) do { apk_log("ERROR: ", args); } while (0)
+-#define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log("WARNING: ", args); } } while (0)
++#define apk_error(args...) do { apk_log_err("ERROR: ", args); } while (0)
++#define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log_err("WARNING: ", args); } } while (0)
+ #define apk_message(args...) do { if (apk_verbosity > 0) { apk_log(NULL, args); } } while (0)
+
+ extern int apk_progress_fd;
+
+ void apk_log(const char *prefix, const char *format, ...);
++void apk_log_err(const char *prefix, const char *format, ...);
+ const char *apk_error_str(int error);
+
+ void apk_reset_screen_width(void);
+diff --git a/src/print.c b/src/print.c
+index 5df51f3..6608152 100644
+--- a/src/print.c
++++ b/src/print.c
+@@ -157,17 +157,28 @@ const char *apk_error_str(int error)
+ }
+ }
+
++static void log(FILE *dest, const char *prefix, const char *format, va_list va)
++{
++ if (prefix != NULL)
++ fprintf(dest, "%s", prefix);
++ vfprintf(dest, format, va);
++ fprintf(dest, "\n");
++ fflush(dest);
++ apk_progress_force = 1;
++}
++
+ void apk_log(const char *prefix, const char *format, ...)
+ {
+ va_list va;
+-
+- if (prefix != NULL)
+- fprintf(stdout, "%s", prefix);
+ va_start(va, format);
+- vfprintf(stdout, format, va);
++ log(stdout, prefix, format, va);
+ va_end(va);
+- fprintf(stdout, "\n");
+- fflush(stdout);
+- apk_progress_force = 1;
+ }
+
++void apk_log_err(const char *prefix, const char *format, ...)
++{
++ va_list va;
++ va_start(va, format);
++ log(stderr, prefix, format, va);
++ va_end(va);
++}
+--
+2.10.0
+
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index a3dd438a98..68cfc34d30 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.7.0
-pkgrel=3
+pkgrel=4
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static"
depends=
@@ -16,6 +16,7 @@ source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
0001-commit-include-limits.h-for-PATH_MAX.patch
0001-db-prevent-umount-proc-when-it-was-mounted-by-someon.patch
0002-db-catch-asprintf-failure.patch
+ 0001-print-print-warnings-and-errors-to-stderr.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"