systemd/0003-delta-do-not-use-unicode-chars-in-C-locale.patch
Stephan Kulow fb793851c7 Accepting request 232406 from Base:System
- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
  to avoid annyoing messages on failing dual_timestamp_is_set in the
  kernel's message ring buffer

- Update udev-generate-peristent-rule.sh from latest git

- Modify and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to avoid also ANSI escape sequences for busy jobs on s390

- Add or port upstram bugfix patches:
  0001-bash-completion-fix-__get_startable_units.patch
  0002-sysctl-replaces-some-slashes-with-dots.patch
  0003-delta-do-not-use-unicode-chars-in-C-locale.patch
  0004-implement-a-union-to-pad-out-file_handle.patch
- Add patch respect-nfs-bg-option.patch from Thomas Blume:
  System fails to boot if nfs mounts get added to fstab (bnc#874665)

- Do not use runtime PM for some IBM consoles (bnc#868931)
  1013-no-runtime-PM-for-IBM-consoles.patch 

- Add patch shut-up-annoying-assertion-monotonic-clock-message.patch
  to avoid annyoing messages on failing dual_timestamp_is_set in the
  kernel's message ring buffer

- Update udev-generate-peristent-rule.sh from latest git

- Modify and extend patch 
  0001-On_s390_con3270_disable_ANSI_colour_esc.patch
  to avoid also ANSI escape sequences for busy jobs on s390

OBS-URL: https://build.opensuse.org/request/show/232406
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=183
2014-05-02 18:51:24 +00:00

135 lines
5.3 KiB
Diff

From 00a5cc3a63c125633e822f39efd9c32223169f62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 16 Apr 2014 23:33:41 -0400
Subject: [PATCH] delta: do not use unicode chars in C locale
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
---
src/delta/delta.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git src/delta/delta.c src/delta/delta.c
index 369f8f8..8fc37c5 100644
--- src/delta/delta.c
+++ src/delta/delta.c
@@ -85,6 +85,10 @@ static void pager_open_if_enabled(void) {
pager_open(false);
}
+static inline const char* arrow(void) {
+ return is_locale_utf8() ? "→" : "->";
+}
+
static int equivalent(const char *a, const char *b) {
_cleanup_free_ char *x = NULL, *y = NULL;
@@ -103,8 +107,9 @@ static int notify_override_masked(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_MASKED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_red(), "[MASKED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_red(), "[MASKED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -112,8 +117,9 @@ static int notify_override_equivalent(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EQUIVALENT))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight_green(), "[EQUIVALENT]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -121,8 +127,9 @@ static int notify_override_redirected(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_REDIRECTED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[REDIRECTED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -130,8 +137,9 @@ static int notify_override_overridden(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_OVERRIDDEN))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[OVERRIDDEN]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -139,8 +147,9 @@ static int notify_override_extended(const char *top, const char *bottom) {
if (!(arg_flags & SHOW_EXTENDED))
return 0;
- printf("%s%s%s %s → %s\n",
- ansi_highlight(), "[EXTENDED]", ansi_highlight_off(), top, bottom);
+ printf("%s%s%s %s %s %s\n",
+ ansi_highlight(), "[EXTENDED]", ansi_highlight_off(),
+ top, arrow(), bottom);
return 1;
}
@@ -241,7 +250,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return -ENOMEM;
d = p + strlen(toppath) + 1;
- log_debug("Adding at top: %s → %s", d, p);
+ log_debug("Adding at top: %s %s %s", d, arrow(), p);
k = hashmap_put(top, d, p);
if (k >= 0) {
p = strdup(p);
@@ -253,7 +262,7 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
return k;
}
- log_debug("Adding at bottom: %s → %s", d, p);
+ log_debug("Adding at bottom: %s %s %s", d, arrow(), p);
free(hashmap_remove(bottom, d));
k = hashmap_put(bottom, d, p);
if (k < 0) {
@@ -276,7 +285,8 @@ static int enumerate_dir_d(Hashmap *top, Hashmap *bottom, Hashmap *drops, const
if (!p)
return -ENOMEM;
- log_debug("Adding to drops: %s → %s → %s", unit, basename(p), p);
+ log_debug("Adding to drops: %s %s %s %s %s",
+ unit, arrow(), basename(p), arrow(), p);
k = hashmap_put(h, basename(p), p);
if (k < 0) {
free(p);
@@ -328,7 +338,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
if (!p)
return -ENOMEM;
- log_debug("Adding at top: %s → %s", basename(p), p);
+ log_debug("Adding at top: %s %s %s", basename(p), arrow(), p);
k = hashmap_put(top, basename(p), p);
if (k >= 0) {
p = strdup(p);
@@ -339,7 +349,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
return k;
}
- log_debug("Adding at bottom: %s → %s", basename(p), p);
+ log_debug("Adding at bottom: %s %s %s", basename(p), arrow(), p);
free(hashmap_remove(bottom, basename(p)));
k = hashmap_put(bottom, basename(p), p);
if (k < 0) {
--
1.7.9.2