mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[unpackfs] Check for squashfs tools earlier
This commit is contained in:
parent
391bd1098f
commit
21f060c3fd
1 changed files with 9 additions and 6 deletions
|
@ -86,12 +86,6 @@ class UnpackEntry:
|
|||
fslist = ""
|
||||
|
||||
if self.sourcefs == "squashfs":
|
||||
if shutil.which("unsquashfs") is None:
|
||||
utils.warning("Failed to find unsquashfs")
|
||||
|
||||
return (_("Failed to unpack image \"{}\"").format(self.source),
|
||||
_("Failed to find unsquashfs, make sure you have the squashfs-tools package installed"))
|
||||
|
||||
fslist = subprocess.check_output(
|
||||
["unsquashfs", "-l", self.source]
|
||||
)
|
||||
|
@ -397,6 +391,9 @@ def run():
|
|||
supported_filesystems = get_supported_filesystems()
|
||||
|
||||
# Bail out before we start when there are obvious problems
|
||||
# - unsupported filesystems
|
||||
# - non-existent sources
|
||||
# - missing tools for specific FS
|
||||
for entry in job.configuration["unpack"]:
|
||||
source = os.path.abspath(entry["source"])
|
||||
sourcefs = entry["sourcefs"]
|
||||
|
@ -410,6 +407,12 @@ def run():
|
|||
utils.warning("The source filesystem \"{}\" does not exist".format(source))
|
||||
return (_("Bad unsquash configuration"),
|
||||
_("The source filesystem \"{}\" does not exist").format(source))
|
||||
if sourcefs == "squashfs":
|
||||
if shutil.which("unsquashfs") is None:
|
||||
utils.warning("Failed to find unsquashfs")
|
||||
|
||||
return (_("Failed to unpack image \"{}\"").format(self.source),
|
||||
_("Failed to find unsquashfs, make sure you have the squashfs-tools package installed"))
|
||||
|
||||
unpack = list()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue