teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.8.1-eat-stdin.patch

Panu Matilainen cc0630
From 53045d5dcdce3988e2586cb315b35e6a675a8152 Mon Sep 17 00:00:00 2001
Panu Matilainen cc0630
From: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen cc0630
Date: Wed, 30 Jun 2010 11:57:17 +0300
Panu Matilainen cc0630
Subject: [PATCH 1/2] Fix potential getOutputFrom() error on font provide extraction (RhBug:609117)
Panu Matilainen cc0630
 - if fonts are detected in the package being built but fc-query isn't
Panu Matilainen cc0630
   present, the script exited without consuming stdin which can break
Panu Matilainen cc0630
   getOutputFrom()
Panu Matilainen cc0630
Panu Matilainen cc0630
---
Panu Matilainen cc0630
 scripts/fontconfig.prov |    5 ++++-
Panu Matilainen cc0630
 1 files changed, 4 insertions(+), 1 deletions(-)
Panu Matilainen cc0630
Panu Matilainen cc0630
diff --git a/scripts/fontconfig.prov b/scripts/fontconfig.prov
Panu Matilainen cc0630
index 8638680..594851d 100755
Panu Matilainen cc0630
--- a/scripts/fontconfig.prov
Panu Matilainen cc0630
+++ b/scripts/fontconfig.prov
Panu Matilainen cc0630
@@ -12,7 +12,10 @@
Panu Matilainen cc0630
 
Panu Matilainen cc0630
 fcquery=/usr/bin/fc-query
Panu Matilainen cc0630
 
Panu Matilainen cc0630
-[ -x $fcquery ] || exit 0
Panu Matilainen 0a9294
+if [ ! -x $fcquery ]; then
Panu Matilainen cc0630
+    cat > /dev/null
Panu Matilainen cc0630
+    exit 0
Panu Matilainen cc0630
+fi
Panu Matilainen cc0630
 
Panu Matilainen cc0630
 # filter out anything outside main fontconfig path
Panu Matilainen cc0630
 grep /usr/share/fonts/ |
Panu Matilainen cc0630
-- 
Panu Matilainen cc0630
1.7.0.1
Panu Matilainen cc0630