From 4370669fc39a93dc80ea35aa907a3d528996d78c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 11 Oct 2019 17:46:01 +0200 Subject: [PATCH] [unpackfs] Put exclusion settings into the rsync command line --- src/modules/unpackfs/main.py | 5 +++++ src/modules/unpackfs/unpackfs.conf | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index bfd291e3c..53ffd37df 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -123,6 +123,11 @@ def file_copy(source, entry, progress_cb): args = ['rsync', '-aHAXr'] args.extend(global_excludes()) + if entry.excludeFile: + args.extend(["--exclude-from=" + entry.excludeFile]) + if entry.exclude: + for f in entry.exclude: + args.extend(["--exclude", f]) args.extend(['--progress', source, dest]) process = subprocess.Popen( args, env=at_env, bufsize=1, stdout=subprocess.PIPE, close_fds=ON_POSIX diff --git a/src/modules/unpackfs/unpackfs.conf b/src/modules/unpackfs/unpackfs.conf index 98569b477..454e82e66 100644 --- a/src/modules/unpackfs/unpackfs.conf +++ b/src/modules/unpackfs/unpackfs.conf @@ -82,7 +82,8 @@ unpack: - source: ../CHANGES sourcefs: file destination: "/tmp/changes.txt" - - source: src/qml/calamares/slideshow/ + - source: src/qml/calamares/slideshow sourcefs: file - destination: "/tmp/" + destination: "/tmp/slideshow/" exclude: [ "*.qmlc", "qmldir" ] + # excludeFile: /etc/calamares/modules/unpackfs/exclude-list.txt