diff options
Diffstat (limited to 'meta/recipes-core')
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 2 | ||||
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch | 99 | ||||
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.30.bb (renamed from meta/recipes-core/util-linux/util-linux_2.29.2.bb) | 7 |
3 files changed, 4 insertions, 104 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 63302a9fe1..1656e92a87 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
| @@ -304,7 +304,7 @@ do_install_ptest() { | |||
| 304 | cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/ | 304 | cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/ |
| 305 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected | 305 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected |
| 306 | 306 | ||
| 307 | list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf" | 307 | list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon" |
| 308 | # The following tests are not installed yet: | 308 | # The following tests are not installed yet: |
| 309 | # blkid scsi_debug module dependent | 309 | # blkid scsi_debug module dependent |
| 310 | # cramfs gcc dependent | 310 | # cramfs gcc dependent |
diff --git a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch deleted file mode 100644 index a6fde5d9cb..0000000000 --- a/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | This patch adds error() API implementation for non-glibc system C libs | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 5 | |||
| 6 | --- | ||
| 7 | misc-utils/test_uuidd.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++- | ||
| 8 | 1 file changed, 61 insertions(+), 1 deletion(-) | ||
| 9 | |||
| 10 | diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c | ||
| 11 | index 36f3b3d..7d579ce 100644 | ||
| 12 | --- a/misc-utils/test_uuidd.c | ||
| 13 | +++ b/misc-utils/test_uuidd.c | ||
| 14 | @@ -23,7 +23,6 @@ | ||
| 15 | * | ||
| 16 | * make uuidd uuidgen localstatedir=/var | ||
| 17 | */ | ||
| 18 | -#include <error.h> | ||
| 19 | #include <pthread.h> | ||
| 20 | #include <stdio.h> | ||
| 21 | #include <stdlib.h> | ||
| 22 | @@ -38,6 +37,17 @@ | ||
| 23 | #include "xalloc.h" | ||
| 24 | #include "strutils.h" | ||
| 25 | |||
| 26 | +#ifdef __GLIBC__ | ||
| 27 | +#include <error.h> | ||
| 28 | +#else | ||
| 29 | +extern void (*error_print_progname)(void); | ||
| 30 | +extern unsigned int error_message_count; | ||
| 31 | +extern int error_one_per_line; | ||
| 32 | + | ||
| 33 | +void error(int, int, const char *, ...); | ||
| 34 | +void error_at_line(int, int, const char *, unsigned int, const char *, ...); | ||
| 35 | +#endif | ||
| 36 | + | ||
| 37 | #define LOG(level,args) if (loglev >= level) { fprintf args; } | ||
| 38 | |||
| 39 | size_t nprocesses = 4; | ||
| 40 | @@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj) | ||
| 41 | fprintf(stderr, "}\n"); | ||
| 42 | } | ||
| 43 | |||
| 44 | +#ifndef __GLIBC__ | ||
| 45 | +extern char *__progname; | ||
| 46 | + | ||
| 47 | +void (*error_print_progname)(void) = 0; | ||
| 48 | +unsigned int error_message_count = 0; | ||
| 49 | +int error_one_per_line = 0; | ||
| 50 | + | ||
| 51 | +static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap) | ||
| 52 | +{ | ||
| 53 | + if (file && error_one_per_line) { | ||
| 54 | + static const char *oldfile; | ||
| 55 | + static unsigned int oldline; | ||
| 56 | + if (line == oldline && strcmp(file, oldfile) == 0) | ||
| 57 | + return; | ||
| 58 | + oldfile = file; | ||
| 59 | + oldline = line; | ||
| 60 | + } | ||
| 61 | + if (error_print_progname) | ||
| 62 | + error_print_progname(); | ||
| 63 | + else | ||
| 64 | + fprintf(stderr, "%s: ", __progname); | ||
| 65 | + if (file) | ||
| 66 | + fprintf(stderr, "%s:%u: ", file, line); | ||
| 67 | + vfprintf(stderr, fmt, ap); | ||
| 68 | + if (e) | ||
| 69 | + fprintf(stderr, ": %s", strerror(e)); | ||
| 70 | + putc('\n', stderr); | ||
| 71 | + fflush(stderr); | ||
| 72 | + error_message_count++; | ||
| 73 | + if (status) | ||
| 74 | + exit(status); | ||
| 75 | +} | ||
| 76 | + | ||
| 77 | +void error(int status, int e, const char *fmt, ...) | ||
| 78 | +{ | ||
| 79 | + va_list ap; | ||
| 80 | + va_start(ap,fmt); | ||
| 81 | + eprint(status, e, 0, 0, fmt, ap); | ||
| 82 | + va_end(ap); | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...) | ||
| 86 | +{ | ||
| 87 | + va_list ap; | ||
| 88 | + va_start(ap,fmt); | ||
| 89 | + eprint(status, e, file, line, fmt, ap); | ||
| 90 | + va_end(ap); | ||
| 91 | +} | ||
| 92 | +#endif /* __GLIBC__ */ | ||
| 93 | + | ||
| 94 | int main(int argc, char *argv[]) | ||
| 95 | { | ||
| 96 | size_t i, nfailed = 0, nignored = 0; | ||
| 97 | -- | ||
| 98 | 2.8.3 | ||
| 99 | |||
diff --git a/meta/recipes-core/util-linux/util-linux_2.29.2.bb b/meta/recipes-core/util-linux/util-linux_2.30.bb index 11303f8ddf..6b309b555f 100644 --- a/meta/recipes-core/util-linux/util-linux_2.29.2.bb +++ b/meta/recipes-core/util-linux/util-linux_2.30.bb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | MAJOR_VERSION = "2.29" | 1 | MAJOR_VERSION = "2.30" |
| 2 | require util-linux.inc | 2 | require util-linux.inc |
| 3 | 3 | ||
| 4 | # To support older hosts, we need to patch and/or revert | 4 | # To support older hosts, we need to patch and/or revert |
| @@ -14,10 +14,9 @@ SRC_URI += "file://configure-sbindir.patch \ | |||
| 14 | file://run-ptest \ | 14 | file://run-ptest \ |
| 15 | file://display_testname_for_subtest.patch \ | 15 | file://display_testname_for_subtest.patch \ |
| 16 | file://avoid_parallel_tests.patch \ | 16 | file://avoid_parallel_tests.patch \ |
| 17 | file://uuid-test-error-api.patch \ | ||
| 18 | " | 17 | " |
| 19 | SRC_URI[md5sum] = "63c40c2068fcbb7e1d5c1d281115d973" | 18 | SRC_URI[md5sum] = "eaa3429150268027908a1b8ae6ee9a62" |
| 20 | SRC_URI[sha256sum] = "accea4d678209f97f634f40a93b7e9fcad5915d1f4749f6c47bee6bf110fe8e3" | 19 | SRC_URI[sha256sum] = "c208a4ff6906cb7f57940aa5bc3a6eed146e50a7cc0a092f52ef2ab65057a08d" |
| 21 | 20 | ||
| 22 | CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" | 21 | CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" |
| 23 | 22 | ||
