diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-28 07:02:56 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-28 07:02:56 +0100 |
commit | a4687095ed79431554cce3a57baba54213b7ddf5 (patch) | |
tree | 41beb8d85b7e1e8b4e71d1cb85a4abd5a2cf49e8 /main.py | |
parent | Add possibility of options in package list. (diff) | |
download | aur-runner-a4687095ed79431554cce3a57baba54213b7ddf5.tar.gz aur-runner-a4687095ed79431554cce3a57baba54213b7ddf5.tar.xz |
Add final output about which packages failed.
Diffstat (limited to '')
-rwxr-xr-x | main.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -244,6 +244,7 @@ def main(): logger.info('Installing from the repos: %s', repo_pkgs) subprocess_with_log(['sudo', 'pacman', *pacman_args, '-S', *repo_pkgs]) + failed_packages = [] for package in aur_pkgs: cmd = subprocess_with_log(['auracle', *auracle_args, '--chdir', cachedir, 'clone', package], capture_output=True, text=True) @@ -257,7 +258,16 @@ def main(): 'PATH': ':'.join(path), } extra_opts = pkg_options.get(package, []) - subprocess_with_log(['makepkg', *makepkg_args, *extra_opts, '--install', *pacman_args], env=env, cwd=cwd) + cmd = subprocess_with_log(['makepkg', *makepkg_args, *extra_opts, '--install', *pacman_args], env=env, cwd=cwd) + if cmd.returncode != 0: + failed_packages.append(package) + + if failed_packages: + logger.warning('The following packages failed: %s', + failed_packages) + else: + logger.info('All packages built successfully') + if __name__ == '__main__': if os.getuid() == 0: |