Skip to contentSkip to conversation

binman: Put our local modules ahead of system modules

PATCH New Simon Glass 3 participants 4 messages Jun 21, 2017 – Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binman: Put our local modules ahead of system modules

If a system module is named the same as one of those used by binman we currently pick the system module. Adjust the ordering so that our modules are chosen instead.

The module conflict reported was 'tools' from jira-python. I cannot access that package to test it.

---

 tools/binman/binman.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
tools/binman/binman.py +4 -5
index 95d3a048d8..09dc36a3f7 100755
@@ -17,15 +17,14 @@ import unittest
 
 # Bring in the patman and dtoc libraries
 our_path = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(our_path, '../patman'))
-sys.path.append(os.path.join(our_path, '../dtoc'))
-sys.path.append(os.path.join(our_path, '../'))
+for dirname in ['../patman', '../dtoc', '..']:
+    sys.path.insert(0, os.path.join(our_path, dirname))
 
 # Bring in the libfdt module
-sys.path.append('tools')
+sys.path.insert(0, 'tools')
 
 # Also allow entry-type modules to be brought in from the etype directory.
-sys.path.append(os.path.join(our_path, 'etype'))
+sys.path.insert(0, os.path.join(our_path, 'etype'))
 
 import cmdline
 import command
Signature · 1 line
2.13.1.611.g7e3b11ae1-goog
#1 lore raw

PATCH 1/1 binman: Put our local modules ahead of system modules

Quoted 9 lines · Simon Glass

If a system module is named the same as one of those used by binman we currently pick the system module. Adjust the ordering so that our modules are chosen instead.

The module conflict reported was 'tools' from jira-python. I cannot access that package to test it.

While I removed the pip package that was causing me problems, this looks basically like the workaround I had done locally.

Thanks for fixing it up,

Kevin

#2 lore raw

PATCH 1/1 binman: Put our local modules ahead of system modules

Quoted 9 lines · Simon Glass

If a system module is named the same as one of those used by binman we currently pick the system module. Adjust the ordering so that our modules are chosen instead.

The module conflict reported was 'tools' from jira-python. I cannot access that package to test it.

While I removed the pip package that was causing me problems, this looks basically like the workaround I had done locally.

Thanks for fixing it up,

Kevin

Applied to u-boot-dm, thanks!

#3 lore raw

PATCH 1/1 binman: Put our local modules ahead of system modules

Quoted 9 lines · Simon Glass

If a system module is named the same as one of those used by binman we currently pick the system module. Adjust the ordering so that our modules are chosen instead.

The module conflict reported was 'tools' from jira-python. I cannot access that package to test it.

While I removed the pip package that was causing me problems, this looks basically like the workaround I had done locally.

Thanks for fixing it up,

Kevin

Applied to u-boot-dm, thanks!
Applied to u-boot-dm, thanks!