Skip to content

gen_config.py: Print out debug for external programs.

Markus Gothe requested to merge genxos/iopsyswrt:gen_config-print-errors into devel

If an external process return non-zero, then we will catch an exception and printout to console the stderr output from the faulty process.

This makes debugging a lot easier:

Updating profiles feed...
Profile alpaca-l3 not found
Error using ./feeds/profiles, testing ./feeds/customerprofiles
Updating profiles feed...
Using the following profiles:
 - Alpaca / Siren L3
 - IOPSYS
 - Airoha
 - gnx
 - GenXOS L3
 - GenXOS repos
Update and install packages
Updating feed 'genxos_packages' from 'https://dev.iopsys.eu/genxos/genxos-packages.git^4cb63f10974a233e3e5951e4e56c3924acc33b42' ...
fatal: reference is not a tree: 4cb63f10974a233e3e5951e4e56c3924acc33b42
failed.
Create index file './feeds/openwrt_core.index' 
Create index file './feeds/openwrt_packages.index' 
Create index file './feeds/openwrt_luci.index' 
Create index file './feeds/openwrt_routing.index' 
Create index file './feeds/openwrt_telephony.index' 
Create index file './feeds/profiles.index' 
Create index file './feeds/customerprofiles.index' 
Create index file './feeds/iopsys.index' 
Create index file './feeds/targets.index' 
Create index file './feeds/airoha.index' 
Create index file './feeds/gnx.index' 
Create index file './feeds/customerpackages.index' 
Create index file './feeds/genxos_packages.index' 

Traceback (most recent call last):
  File "/home/markus/genxoswrt/./scripts/gen_config.py", line 539, in <module>
    update_and_install_packages(profile, args.keep)
  File "/home/markus/genxoswrt/./scripts/gen_config.py", line 347, in update_and_install_packages
    result = run_command(update_feeds)
  File "/home/markus/genxoswrt/./scripts/gen_config.py", line 47, in run_command
    res = run(command, stdout=PIPE, stderr=PIPE, text=True, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./scripts/feeds', 'update', '-g']' returned non-zero exit status 1.
Edited by Markus Gothe

Merge request reports