From db0ad3aa936e7c7307fc885632ac167ce4e5f59a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 10 Jun 2014 06:31:47 +0100 Subject: [PATCH] [bin] source bashrc before calling either eit or emerge --- bin/bump_kernel_packages | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/bump_kernel_packages b/bin/bump_kernel_packages index fc130d00..e8c58a01 100755 --- a/bin/bump_kernel_packages +++ b/bin/bump_kernel_packages @@ -179,6 +179,7 @@ if __name__ == "__main__": dirs.append(portage_tmpdir) os.environ["PORTAGE_TMPDIR"] = portage_tmpdir + cmd_prefix = "test -e ~/.bashrc && source ~/.bashrc;" if normal_atoms and not nsargs.only_injected: args = ["emerge", "-v", "--keep-going"] @@ -186,7 +187,7 @@ if __name__ == "__main__": args.append("-a") args += [x for x in normal_atoms] # emerge is a shell function in bashrc - rc = subprocess.call(" ".join(args), shell=True) + rc = subprocess.call(cmd_prefix + " ".join(args), shell=True) if rc != 0 and not nsargs.canfail: raise SystemExit(rc) subprocess.call(["/usr/sbin/etc-update"]) @@ -197,7 +198,7 @@ if __name__ == "__main__": args += normal_atoms # eit is a shell function in bashrc - rc = subprocess.call(" ".join(args), shell=True) + rc = subprocess.call(cmd_prefix + " ".join(args), shell=True) if rc != 0: raise SystemExit(rc) @@ -212,7 +213,7 @@ if __name__ == "__main__": args.append("-a") args += [x for x in injected_atoms] # emerge is a shell function in .bashrc - rc = subprocess.call(" ".join(args), shell=True) + rc = subprocess.call(cmd_prefix + " ".join(args), shell=True) if rc != 0 and not nsargs.canfail: raise SystemExit(rc) @@ -230,7 +231,7 @@ if __name__ == "__main__": args = ["eit", "inject", "--to", nsargs.build_repo] args += tbz2s # eit is a shell function in bashrc - rc = subprocess.call(" ".join(args), shell=True) + rc = subprocess.call(cmd_prefix + " ".join(args), shell=True) if rc != 0: raise SystemExit(rc)