"KeyError" when pmaports is named something non-standard
@calebccff as mentioned in chat:
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/__init__.py", line 71, in main
return config_init.frontend(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/config/init.py", line 694, in frontend
channel = ask_for_channel(config)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/config/init.py", line 124, in ask_for_channel
channels_cfg = pmb.helpers.git.parse_channels_cfg(pkgrepo_default_path())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/meta/__init__.py", line 38, in __call__
self.cache.cache[key] = self.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/helpers/git.py", line 129, in parse_channels_cfg
remote = get_upstream_remote(aports)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luca/dev/postmarketOS/pmbootstrap/pmb/helpers/git.py", line 102, in get_upstream_remote
urls = pmb.config.git_repos[name_repo]
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'aports1'
Relevant pmbootstrap config
snippet:
[pmbootstrap]
aports = /home/luca/dev/postmarketOS/aports1
To reproduce just run e.g. pmbootstrap init
with pmbootstrap master with aports set to a directory that's not named "pmaports" I guess.