mirror of
https://github.com/andreili/SBC_builder.git
synced 2025-09-13 00:51:12 +02:00
Fix owner for modules.
This commit is contained in:
parent
727245e1e7
commit
1b12c3c654
@ -233,12 +233,12 @@ class OS:
|
||||
my_env["XZ_OPT"] = "-9 --extreme --threads=0"
|
||||
self.__sudo(["tar", "xf", arch_fn], cwd=to_path, env=my_env)
|
||||
|
||||
def __make_sqh(self, root_path, to_file):
|
||||
def __make_sqh(self, root_path, to_file, extra=""):
|
||||
Logger.os("Create squashed archive...")
|
||||
t_file = Path(to_file)
|
||||
if (t_file.is_file()):
|
||||
shutil.move(to_file, f"{to_file}.bak")
|
||||
self.__sudo(["mksquashfs", root_path, to_file, "-comp", "xz", "-xattrs-exclude", "^system.nfs"])
|
||||
self.__sudo(f"mksquashfs {root_path} {to_file} -comp xz -xattrs-exclude ^system.nfs {extra}", shell=True)
|
||||
user = getpass.getuser()
|
||||
self.__sudo(["chown", user + ":" + user, to_file])
|
||||
|
||||
@ -253,7 +253,7 @@ class OS:
|
||||
kmod = Path(kmod_fn)
|
||||
for f in kmod.iterdir():
|
||||
sqh_name = f.name
|
||||
self.__make_sqh(f"{kmod_fn}/../../..", f"{mod_path}/{sqh_name}.lzm")
|
||||
self.__make_sqh(f"{kmod_fn}/../../..", f"{mod_path}/{sqh_name}.lzm", "-all-root")
|
||||
break
|
||||
|
||||
def sqh(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user