[RTEMS Project] #4927: "Build Your Application" (Quick Start section 2.7) doesn't work
RTEMS trac
trac at rtems.org
Wed Oct 4 15:20:15 UTC 2023
#4927: "Build Your Application" (Quick Start section 2.7) doesn't work
-----------------------+---------------------
Reporter: bsterling | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone:
Component: admin | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: |
-----------------------+---------------------
Comment (by John Willis):
Replying to [comment:8 Chris Johns]:
> Replying to [comment:7 John Willis]:
> > Replying to [comment:6 Chris Johns]:
> > > I am sorry if I have dropped the ball on this.
> > >
> > > Is there a patch for this I can push with the appropriate attributes
etc?
> >
> > Hey Chris. I have a patch. I am having a smtp failure though when
trying to do `git send-email` though unfortunately.
>
> We have this https://docs.rtems.org/branches/master/eng/vc-users.html.
All we need is your details for the change so it is attributed to you.
I had looked through those docs and created a patch, but like I said I am
unable to email due to smftp error -- this is probably due to Google's
updated policies on third party apps in recent years. I am happy to email
it directly, as well, but for the time being here is the patch:
From ec5198b81bbdd1657cbf2df32013498f2c2e0322 Mon Sep 17 00:00:00 2001
From: jmart <jmart.will at gmail.com>
Date: Wed, 27 Sep 2023 15:38:03 -0600
Subject: [PATCH] we were calling next on a potentially empty generator,
thus
producing a StopIteration. Add a try/except around this call and return
None.
UPDATE #4927
---
rtems.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/rtems.py b/rtems.py
index c65a7d2..c40aa01 100644
--- a/rtems.py
+++ b/rtems.py
@@ -859,7 +859,11 @@ def _check_arch_bsps(req, config, path, archs,
version):
def _arch_from_arch_bsp(arch_bsp):
fields = arch_bsp.split('-')
- rtems_field_index = next(i for i, field in enumerate(fields) if
field.startswith('rtems'))
+ try:
+ rtems_field_index = next(i for i, field in enumerate(fields) if
field.startswith('rtems'))
+ except StopIteration:
+ return None
+
return '-'.join(fields[:(rtems_field_index + 1)])
--
2.34.1
--
Ticket URL: <http://devel.rtems.org/ticket/4927#comment:9>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list