[rtems-source-builder commit] sb/get-source: Add a macro to indicate the get-source command is running.

Chris Johns chrisj at rtems.org
Sat Oct 26 21:26:33 UTC 2019


Module:    rtems-source-builder
Branch:    master
Commit:    3e22fc45d2690ed8ec3f2a9b01b1f767f3802980
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=3e22fc45d2690ed8ec3f2a9b01b1f767f3802980

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sun Oct 27 08:20:38 2019 +1100

sb/get-source: Add a macro to indicate the get-source command is running.

- Fix GDB's library checks to ignore errors when getting the source.

---

 source-builder/config/gdb-common-1.cfg | 2 +-
 source-builder/sb/getsources.py        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index 0f028ff..87b9d0a 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -114,7 +114,7 @@
   %else
     %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib})
   %endif
-  %if %{gdb-python-lib-check} == not-found
+  %if %{gdb-python-lib-check} == not-found && !%{_rsb_getting_source}
     %error "gdb: python: library file not found: %{gdb-python-ver-lib}, please install"
   %endif
 %endif
diff --git a/source-builder/sb/getsources.py b/source-builder/sb/getsources.py
index 4fc9395..7e516b5 100644
--- a/source-builder/sb/getsources.py
+++ b/source-builder/sb/getsources.py
@@ -281,6 +281,7 @@ class buildset:
             self.macros = copy.copy(opts.defaults)
         else:
             self.macros = copy.copy(macros)
+        self.macros.define('_rsb_get_source')
         log.trace('_bset: %s: macro defaults' % (bset))
         log.trace(str(self.macros))
         self.bset = bset



More information about the vc mailing list