forked from Mirror/pmbootstrap
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
This commit is contained in:
parent
ef9d618199
commit
c4194759f5
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue