[GSoC 2020]: Need help in writing sed alternative in Python for RSB recipes

Gedare Bloom gedare at rtems.org
Sun Aug 16 15:52:46 UTC 2020


On Sun, Aug 16, 2020 at 4:16 AM Mritunjay Sharma
<mritunjaysharma394 at gmail.com> wrote:
>
>
>
> On Sun, Aug 16, 2020 at 1:12 PM Chris Johns <chrisj at rtems.org> wrote:
>>
>> On 16/8/20 8:29 am, Mritunjay Sharma wrote:
>> > On Sun, Aug 16, 2020 at 12:15 AM Gedare Bloom <gedare at rtems.org
>> > <mailto:gedare at rtems.org>> wrote:
>> >
>> >     Hi Mritunjay, Chris:
>> >
>> >     For the RSB, since it is user-facing, we need to be sure to minimize
>> >     its dependencies on the user environment and platform. So this pycli
>> >     can only be used if it is distributed standard with Python 2 and
>> >     Python 3.
>> >
>> >     Would someone be able to apply this patch and use it to build epics?
>> >     No, because (1) they won't have pycli available, and (2) they don't
>> >     have a path /home/mritunjay
>> >
>> >
>> > I think what you are saying is absolutely right. It will be really a great help
>> > if Chris can guide on what next can be done.
>>
>> See below.
>>
>> > As far as 'pycli' is concerned, I have made a couple of minor tweaks. Gave it a
>> > better name 'sedpy' and made it public on GitHub.
>> >
>> > Please find the link to the
>> > project here: https://github.com/mritunjaysharma394/sedpy
>>
>> Thanks but I currently do not see a need for this tool.
>>
>> > I will appreciate if mentors can have a look and try this and see if it in any
>> > way can be modified
>> > to be used with RSB or else we will go with what is suggested.
>>
>> Please put the RSB to one side. I will let you know when we can return to it.
>>
>> I believe patching config files in EPCIS from the RSB is fragile. EPICS should
>> be free to change any of these files without needing to considering the effect
>> it has on the RSB. Just because we can peek inside does not means we are free to
>> exploit what we see.
>>
>> What happens if you define the needed variables on the make command line? For
>> example:
>>
>>  gmake RTEMS_BASE=$HOME/development/rtems/5 RTEMS_VERSION=5.1-rc2
>>
>> These variables are just normal make ones and so they can be overridden from the
>> command line.
>>
>> Please investigate this and see what happens?
>
>
> Hi Chris,
> I investigated and used:
>
>  `make RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5`
>
> This worked perfectly fine and the build was successful. Thank you so much for telling this. It makes it so
> easy. What can we do next? This surely removes the requirement of `sed` or the tool I built to make command line changes.
>

Of course! (I got stuck too far down the rabbit hole to see the
problem.) Now, you should attempt to rebuild EPICS for the two BSPs
you've done, but this time inject the configuration flags on the make
command lines etc. Once you've done this, then you will need to
revisit RSB to see how to write the code that can do the same thing.

That should only leave us with the last 'todo' of figuring out how to
use epics-base instead of Heinz' playground. If you can start to
figure out the differences between those two, I think that could be a
good start.

> Thanks
> Mritunjay
>
>>
>> Chris
>>


More information about the devel mailing list