Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
14004 commits behind the upstream repository.
  • Masahiro Yamada's avatar
    f432c33f
    tools: moveconfig: simplify source tree switching · f432c33f
    Masahiro Yamada authored
    
    The subprocess.Popen() does not change the child process's working
    directory if cwd=None is given.  Let's exploit this fact to refactor
    the source directory handling.
    
    We no longer have to pass "-C <reference_src_dir>" to the sub-process
    because self.current_src_dir tracks the source tree against which we
    want to run defconfig/autoconf.
    
    The flag self.use_git_ref is not necessary either because we can know
    the current state by checking whether the self.current_src_dir is a
    valid string or None.
    
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    f432c33f
    History
    tools: moveconfig: simplify source tree switching
    Masahiro Yamada authored
    
    The subprocess.Popen() does not change the child process's working
    directory if cwd=None is given.  Let's exploit this fact to refactor
    the source directory handling.
    
    We no longer have to pass "-C <reference_src_dir>" to the sub-process
    because self.current_src_dir tracks the source tree against which we
    want to run defconfig/autoconf.
    
    The flag self.use_git_ref is not necessary either because we can know
    the current state by checking whether the self.current_src_dir is a
    valid string or None.
    
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
moveconfig.py 34.06 KiB