garmin / pyrex

Seamless container setup for developing with OpenEmbedded/Yocto Project
Apache License 2.0
36 stars 29 forks source link

pyrex.py: use regexp to find subuid or subgid #66

Closed QSchulz closed 3 years ago

QSchulz commented 3 years ago

Since what's looked for is explicitly known, let's use a regexp to specifically find a match and return the appropriate data.

This also helps with hand-crafted /etc/subuid and /etc/subgid where newlines and comments can be among the expected lines.

Signed-off-by: Quentin Schulz quentin.schulz@theobroma-systems.com Signed-off-by: Quentin Schulz foss@0leil.net