From 9bd4e1ffb90bfda86d644d0d49dd013c9df2c3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Mon, 12 Sep 2011 07:45:44 +0000 Subject: [PATCH] pisi/util: Warn when patch/quilt is missing --- pisi/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pisi/util.py b/pisi/util.py index cd324f6c..68f4603d 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -541,6 +541,9 @@ def do_patch(sourceDir, patchFile, level=0, name=None, reverse=False): if out is None and err is None: # Which means stderr and stdout directed so they are None raise Error(_("ERROR: patch (%s) failed") % (patchFile)) + elif ret == 127: + # 127 means that shell can't find the given program. + raise Error(_("ERROR: %s is not installed on your system.") % "patch") else: raise Error(_("ERROR: patch (%s) failed: %s") % (patchFile, out))