From 2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 4 Dec 2016 19:14:48 -0600 Subject: APKFile: allow skipping of unnecessary phases --- apkkit/io/apkfile.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/apkkit/io/apkfile.py b/apkkit/io/apkfile.py index 3cce809..45b588b 100644 --- a/apkkit/io/apkfile.py +++ b/apkkit/io/apkfile.py @@ -69,6 +69,19 @@ def load_package_split(package): return splits +def skip_split(): + """Return the list of packages that should not be split globally.""" + + try: + with open('/etc/apkkit/split/skip.conf') as skipconf: + skips = [pkg[:-1] for pkg in skipconf.readlines()] + except OSError: + LOGGER.error('No global skip-split package information file.') + skips = [] + + return skips + + def path_components(path): """Find all directories that make up a full path.""" @@ -361,9 +374,12 @@ class APKFile: files = [] - splits = load_global_split() - splits += load_package_split(package) - splits = [split for split in splits if split is not None] + if package.name in skip_split(): + splits = [] + else: + splits = load_global_split() + splits += load_package_split(package) + splits = [split for split in splits if split is not None] exclude_from_base = [] -- cgit v1.2.3-70-g09d2