Replace bash parser with Python (shlex) for proper quote handling#3
Merged
Conversation
fkzys
force-pushed
the
refactor/python-config-parser
branch
from
May 3, 2026 12:57
f309963 to
acf2b2d
Compare
fkzys
force-pushed
the
refactor/python-config-parser
branch
from
May 3, 2026 13:35
1440f87 to
4899969
Compare
fkzys
force-pushed
the
refactor/python-config-parser
branch
from
May 3, 2026 17:17
00da946 to
5694340
Compare
fkzys
force-pushed
the
refactor/python-config-parser
branch
from
May 3, 2026 19:45
6a90534 to
b4c1bb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the brittle bash-based config parser with a proper Python implementation using
shlexfor shell-style quote handling.Key changes:
lib/atomic/config.py– new Python parser with:dump– JSON outputvalidate– check numeric valuesshell– shell-safe KEY=value outputarray– null-separated token array forCHROOT_COMMANDatomic-upgrade– usesconfig.py arrayto parseCHROOT_COMMANDwith proper quote supportcommon.sh–load_config()now consumesconfig.py shelloutputTests – added
test_config.py, removed obsoletetest_config.shCI & Makefile – updated to run Python tests, install
config.pyBenefits:
CHROOT_COMMAND="pacman -S 'nvidia dkms'"