Dear Maintainer,
Use of kconfigeditor2/process.py fails to generate output target directories
for new external CONFIG_OUTPUT path.
Steps to reproduce:
# apt build-dep linux
# apt install '^linux-support-.*$'
# git -C $HOME/source clone --depth 1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux.git
# git -C $HOME/source clone --depth 1 https://salsa.debian.org/kernel-
team/kernel-team.git debian-kernel-team.git
# git -C $HOME/source clone --depth 1 https://salsa.debian.org/kernel-
team/linux.git debian-linux.git
# $HOME/source/debian-kernel-team.git/utils/kconfigeditor2/process.py -c
$HOME/build/debian-kernel-config -s $HOME/source/linux.git $HOME/source/debian-
linux.git
# $HOME/source/debian-kernel-team.git/utils/kconfigeditor2/process.py -c
$HOME/build/debian-kernel-config -s $HOME/source/linux.git $HOME/source/debian-
linux.git
```
Traceback (most recent call last):
File "/home/user/source/debian-kernel-
team.git/utils/kconfigeditor2/process.py", line 80, in <module>
Main(package, source, config_output)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/source/debian-kernel-
team.git/utils/kconfigeditor2/process.py", line 42, in __init__
f = open(filename_tmp, 'w')
FileNotFoundError: [Errno 2] No such file or directory:
'/home/user/build/debian-kernel-config/config.tmp'
```
The above error may be expected, however creating that directory does not get
us to where we need to be:
mkdir $HOME/build/debian-kernel-config
# $HOME/source/debian-kernel-team.git/utils/kconfigeditor2/process.py -c
$HOME/build/debian-kernel-config -s $HOME/source/linux.git $HOME/source/debian-
linux.git
```
Traceback (most recent call last):
File "/home/user/source/debian-kernel-
team.git/utils/kconfigeditor2/process.py", line 80, in <module>
Main(package, source, config_output)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/source/debian-kernel-
team.git/utils/kconfigeditor2/process.py", line 42, in __init__
f = open(filename_tmp, 'w')
FileNotFoundError: [Errno 2] No such file or directory:
'/home/user/build/debian-kernel-config/alpha/config.tmp'
```
Additional action of creating the expected directories leads to an
approximately successful run:
# find $HOME/source/debian-linux.git/debian/config -mindepth 2 -maxdepth 2
-iname 'config*' -type f -exec sh -c "cd $HOME/build/debian-kernel-config ;
dirname {} | xargs -n 1 basename | xargs mkdir" \;
# $HOME/source/debian-kernel-team.git/utils/kconfigeditor2/process.py -c
$HOME/build/debian-kernel-config -s $HOME/source/linux.git $HOME/source/debian-
linux.git
```
/home/user/source/debian-linux.git/debian/config/config: Unknown setting
CONFIG_CRYPTO_MANAGER=y
/home/user/source/debian-linux.git/debian/config/config: Unknown setting #
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
```
...snip...
```
/home/user/source/debian-linux.git/debian/config/amd64/config: Unknown setting
CONFIG_CRYPTO_SHA256_SSSE3=m
/home/user/source/debian-linux.git/debian/config/amd64/config: Unknown setting
CONFIG_X86_X32_DISABLED=y
```
There are of course missing information in the output as this is not the exact
described workflow from documentation. However it is quick-and-dirty way to get
a useful kernel config.
Creating the target directories by default may not be intended or would mask
some error.
Should kconfigeditor2/process.py have an option (or by default) populate target
directories for this usage?