diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2016-12-04 19:14:48 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2016-12-04 19:14:48 -0600 |
commit | 2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0 (patch) | |
tree | 826ef4cde90d214b3377317beab243ce90f5aecb | |
parent | f4d52a1fd79084483cf4adf804aa7f595c8deb27 (diff) | |
download | apkkit-2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0.tar.gz apkkit-2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0.tar.bz2 apkkit-2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0.tar.xz apkkit-2a6aa165aa8b4b4e33aa3001bbd118dfa5b9b1e0.zip |
APKFile: allow skipping of unnecessary phases
-rw-r--r-- | apkkit/io/apkfile.py | 22 |
1 files 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 = [] |