[U-Boot] [PATCH] patman: Don't run patman when it is imported as a module

Chris Packham judge.packham at gmail.com
Sat Aug 1 11:32:30 CEST 2015


On Sat, Aug 1, 2015 at 12:06 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi Chris,
>
> On 30 July 2015 at 23:34, Chris Packham <judge.packham at gmail.com> wrote:
>> Hi Simon,
>>
>> On Fri, Jul 31, 2015 at 7:47 AM, Simon Glass <sjg at chromium.org> wrote:
>>> Commit 488d19c (patman: add distutils based installer) has the side effect
>>> of making patman run twice with each invocation. Fix this by checking for
>>> 'main program' invocation in patman.py. This is good practice in any case.
>>>
>>> Signed-off-by: Simon Glass <sjg at chromium.org>
>>> ---
>>
>> Reviewed-by: Chris Packham <judge.packham at gmail.com>
>>
>> I did (kind of) think about that at the time when I had to handle the
>> in-tree vs out-of-tree usage. One solution would have been to move
>> most of the code to a module ("patch-manager" say) and have the patman
>> script import that. The same would work for anything else that wanted
>> to bring in bits of patman (buildman perhaps?).
>
> Ah OK. We could do this, but what is the benefit? Buildman currently
> imports the particular modules it needs and doesn't use the top-level
> tool.
>

That may play into the de-coupling of u-boot and patman. Some of these
common bits could be yet another re-usable component that both patman
and buildman use. But then you'd have to come up with a name for such
a component which we all know is a NP-hard problem :).

I haven't really looked at buildman and only have a vague
understanding of what it does. Do you think it too would be useful
outside of u-boot?

>  [snip]
>
> Regards,
> Simon


More information about the U-Boot mailing list