From 7ead642b2393bfc750d80aecc2873956575aabb7 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Tue, 26 May 2020 18:12:37 +0200
Subject: [PATCH] [build] Fix base_build() logs

---
 bob/devtools/build.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/bob/devtools/build.py b/bob/devtools/build.py
index 806fc087..68489b4a 100644
--- a/bob/devtools/build.py
+++ b/bob/devtools/build.py
@@ -633,21 +633,19 @@ def base_build(
 
     if all(urls):
         logger.info(
-            "Skipping build for %s as packages with matching "
+            "Skipping build(s) for recipe at '%s' as packages with matching "
             "characteristics exist (%s)",
-            path,
+            recipe_dir,
             ", ".join(urls),
         )
         return
 
     if any(urls):
-        logger.error(
-            "One or more packages for %s already exist (%s). "
-            "Change the package build number to trigger a build.",
-            path,
-            ", ".join(urls),
+        raise RuntimeError(
+            "One or more packages for recipe at '%s' already exist (%s). "
+            "Change the package build number to trigger a build." % \
+            (recipe_dir, ", ".join(urls)),
         )
-        return
 
     # if you get to this point, just builds the package(s)
     logger.info("Building %s", path)
-- 
GitLab