From: Simon Glass Date: Wed, 21 Jun 2017 03:28:49 +0000 (-0600) Subject: binman: Put our local modules ahead of system modules X-Git-Tag: v2017.09-rc1~214^2~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7feccfdc45d5708ffd682a025d6d6e8907f1a97a;p=u-boot 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. Signed-off-by: Simon Glass Reported-by: Kevin Hilman Acked-by: Kevin Hilman --- diff --git a/tools/binman/binman.py b/tools/binman/binman.py index 95d3a048d8..09dc36a3f7 100755 --- a/tools/binman/binman.py +++ b/tools/binman/binman.py @@ -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