ulfalizer / Kconfiglib

A flexible Python 2/3 Kconfig implementation and library
ISC License
448 stars 160 forks source link

kconfig: kconfiglib.py: Backup files only #101

Open domo141 opened 3 years ago

domo141 commented 3 years ago

The _save_old() to return early if is not file (or symlink to a file).

This is simplest alternative to avoid attempt to rename /dev/null (which could succeed).

This also keeps fifos (perhaps nonexistent potential usage but this is nicer).

If were directory or socket, after shutil.copyfile(), writing to the file (by caller, _write_config()), would fail.

Co-authored-by: Marti Bolivar marti.bolivar@nordicsemi.no Signed-off-by: Tomi Ollila tomi.ollila@iki.fi

domo141 commented 3 years ago

See PR with same content in

https://github.com/zephyrproject-rtos/zephyr/pull/31438

and related issue in

https://github.com/zephyrproject-rtos/zephyr/issues/31362

for reasoning

jackrosenthal commented 3 weeks ago

Rather unfortunately, it appears the original author of Kconfiglib disappeared. The Zephyr project has been granted ownership of the PyPI package via PEP-541 request, and I'm going to do a release based on a new repository in the zephyrproject-rtos organization here: https://github.com/zephyrproject-rtos/Kconfiglib

:arrow_right: Action required: @domo141 Are you able to re-open your pull request on the new repository?