From 377a1c3a1705c850830abdd979a32dc4a093a782 Mon Sep 17 00:00:00 2001 From: hmikihth Date: Sat, 4 Jun 2016 03:15:43 +0100 Subject: [PATCH 1/4] Support the already mounted loop fs (example in the blackPanther OS) --- src/modules/unpackfs/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 0d7827f84..317127cec 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -198,7 +198,10 @@ class UnpackOperation: :param entry: :param imgmountdir: """ - subprocess.check_call(["mount", entry.source, imgmountdir, "-t", entry.sourcefs, "-o", "loop"]) + if os.path.isdir(entry.source): + subprocess.check_call(["mount", "--bind", entry.source, imgmountdir]) + else: + subprocess.check_call(["mount", entry.source, imgmountdir, "-t", entry.sourcefs, "-o", "loop"]) def unpack_image(self, entry, imgmountdir): """ Unpacks image. @@ -278,7 +281,8 @@ def run(): destination = os.path.abspath(root_mount_point + entry["destination"]) - if not os.path.exists(source) or os.path.isdir(source): + # Modified for blackPanther OS support (www.blackpantheros.eu) + if not os.path.exists(source): return "Bad source", "source=\"{}\"".format(source) if not os.path.isdir(destination): From 062e9b764c9ee5959896f8df582d8e70863eb453 Mon Sep 17 00:00:00 2001 From: hmikihth Date: Sat, 4 Jun 2016 12:11:02 +0100 Subject: [PATCH 2/4] blackPanther OS and Fedora compatibility --- src/modules/unpackfs/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 317127cec..081908fae 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -26,6 +26,7 @@ import shutil import subprocess import sys import tempfile +import platform from libcalamares import * @@ -282,7 +283,7 @@ def run(): destination = os.path.abspath(root_mount_point + entry["destination"]) # Modified for blackPanther OS support (www.blackpantheros.eu) - if not os.path.exists(source): + if not os.path.exists(source) or (os.path.isdir(source) and platform.dist()[0] != "blackPanther"): return "Bad source", "source=\"{}\"".format(source) if not os.path.isdir(destination): From f18dc024596508b145e33a413e8e8c8ad594459f Mon Sep 17 00:00:00 2001 From: hmikihth Date: Sat, 4 Jun 2016 12:23:59 +0100 Subject: [PATCH 3/4] A comment has been deleted --- src/modules/unpackfs/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 081908fae..7823791bf 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -282,7 +282,6 @@ def run(): destination = os.path.abspath(root_mount_point + entry["destination"]) - # Modified for blackPanther OS support (www.blackpantheros.eu) if not os.path.exists(source) or (os.path.isdir(source) and platform.dist()[0] != "blackPanther"): return "Bad source", "source=\"{}\"".format(source) From 42ceffa2e9fe9ae9d208b98e47e03126c1f9e9a1 Mon Sep 17 00:00:00 2001 From: hmikihth Date: Sun, 5 Jun 2016 13:16:31 +0100 Subject: [PATCH 4/4] . --- src/modules/unpackfs/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 7823791bf..926bc0f01 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -26,7 +26,6 @@ import shutil import subprocess import sys import tempfile -import platform from libcalamares import * @@ -282,7 +281,7 @@ def run(): destination = os.path.abspath(root_mount_point + entry["destination"]) - if not os.path.exists(source) or (os.path.isdir(source) and platform.dist()[0] != "blackPanther"): + if not os.path.exists(source): return "Bad source", "source=\"{}\"".format(source) if not os.path.isdir(destination):