Skip to content
Snippets Groups Projects
Unverified Commit c4194759 authored by Oliver Smith's avatar Oliver Smith
Browse files

require_programs: Debian: find kpartx and losetup (MR 2475)

In Debian, /usr/sbin is not in PATH of regular users unless using sudo.
Fix that pmbootstrap won't find kpartx and losetup in /usr/sbin, and
complains about these even though they are installed.

Fixes: issue 2489
parent ef9d6181
Branches
No related tags found
No related merge requests found
......@@ -37,7 +37,9 @@ import pmb.parse._apkbuild
def require_programs() -> None:
missing = []
for program in pmb.config.required_programs:
if not shutil.which(program):
# Debian: some programs are in /usr/sbin, which is not in PATH
# unless using sudo
if not shutil.which(program) and not os.path.exists(os.path.join("/usr/sbin", program)):
missing.append(program)
losetup_missing_json = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment